h264parse: tweak default setting of format and alignment in codec_data case
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 6 Apr 2012 12:27:06 +0000 (14:27 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 6 Apr 2012 12:36:44 +0000 (14:36 +0200)
... which should promote ending up in passthrough mode.

gst/videoparsers/gsth264parse.c

index af0afac..bfdc4d4 100644 (file)
@@ -1640,10 +1640,10 @@ gst_h264_parse_set_caps (GstBaseParse * parse, GstCaps * caps)
 
     /* if upstream sets codec_data without setting stream-format and alignment, we
      * assume stream-format=avc,alignment=au */
-    if (format == GST_H264_PARSE_FORMAT_NONE) {
+    if (format == GST_H264_PARSE_FORMAT_NONE)
       format = GST_H264_PARSE_FORMAT_AVC;
+    if (align == GST_H264_PARSE_ALIGN_NONE)
       align = GST_H264_PARSE_ALIGN_AU;
-    }
   } else {
     GST_DEBUG_OBJECT (h264parse, "have bytestream h264");
     /* nothing to pre-process */