x264enc: fix up avcC header construction and playback by flash players
x264enc: fix up avcC header construction and playback by flash players

Fix off-by-one bug when constructing the avcC header chunk: we
wrote wrong profile info into the header. The first byte in the
SPS NAL we get from x264 is the nal type, not the profile_idc.

Also add some debug logging.

Fixes #610089.

knuesel/gst-plugins-ugly,krieger-od/gst-plugins-ugly,GStreamer/gst-plugins-ugly,sebras/gst-plugins-ugly,Lachann/gst-plugins-ugly,surround-io/gst-plugins-ugly,collects/gst-plugins-ugly,matsu/gst-plugins-ugly,GStreamer/gst-plugins-ugly,jar1karp/gst-plugins-ugly,jpakkane/gstreamer-plugins-ugly,Kurento/gst-plugins-ugly,sebras/gst-plugins-ugly,jar1karp/gst-plugins-ugly,jpakkane/gstreamer-plugins-ugly,reynaldo-samsung/gst-plugins-ugly,Lachann/gst-plugins-ugly,cablelabs/gst-plugins-ugly,krieger-od/gst-plugins-ugly,cablelabs/gst-plugins-ugly,jahrome/gst-plugins-ugly,ylatuya/gst-plugins-ugly,surround-io/gst-plugins-ugly,knuesel/gst-plugins-ugly,jar1karp/gst-plugins-ugly,Distrotech/gst-plugins-ugly,collects/gst-plugins-ugly,StreamUtils/gst-plugins-ugly,ahmedammar/platform_external_gst_plugins_ugly,freedesktop-unofficial-mirror/gstreamer__gst-plugins-ugly,alessandrod/gst-plugins-ugly,GrokImageCompression/gst-plugins-ugly,alessandrod/gst-plugins-ugly,fluendo/gst-plugins-ugly,fluendo/gst-plugins-ugly,StreamUtils/gst-plugins-ugly,Distrotech/gst-plugins-ugly,reynaldo-samsung/gst-plugins-ugly,Distrotech/gst-plugins-ugly,jahrome/gst-plugins-ugly,fluendo/gst-plugins-ugly,shelsonjava/gst-plugins-ugly,matsu/gst-plugins-ugly,freedesktop-unofficial-mirror/gstreamer-sdk__gst-plugins-ugly,freedesktop-unofficial-mirror/gstreamer-sdk__gst-plugins-ugly,shelsonjava/gst-plugins-ugly,Lachann/gst-plugins-ugly,reynaldo-samsung/gst-plugins-ugly,krieger-od/gst-plugins-ugly,sebras/gst-plugins-ugly,jpakkane/gstreamer-plugins-ugly,ahmedammar/platform_external_gst_plugins_ugly,ylatuya/gst-plugins-ugly,cablelabs/gst-plugins-ugly,matsu/gst-plugins-ugly,GStreamer/gst-plugins-ugly,freedesktop-unofficial-mirror/gstreamer__gst-plugins-ugly,freedesktop-unofficial-mirror/gstreamer__gst-plugins-ugly,Distrotech/gst-plugins-ugly,ylatuya/gst-plugins-ugly,shelsonjava/gst-plugins-ugly,collects/gst-plugins-ugly,ahmedammar/platform_external_gst_plugins_ugly,StreamUtils/gst-plugins-ugly,krieger-od/gst-plugins-ugly,Kurento/gst-plugins-ugly,Kurento/gst-plugins-ugly,alessandrod/gst-plugins-ugly,matsu/gst-plugins-ugly,GrokImageCompression/gst-plugins-ugly,GrokImageCompression/gst-plugins-ugly,jahrome/gst-plugins-ugly,Distrotech/gst-plugins-ugly,collects/gst-plugins-ugly,surround-io/gst-plugins-ugly,freedesktop-unofficial-mirror/gstreamer-sdk__gst-plugins-ugly,knuesel/gst-plugins-ugly