vc1parse: fix framesize when input is frame-layer
authorAurélien Zanelli <aurelien.zanelli@parrot.com>
Thu, 9 Oct 2014 16:18:02 +0000 (18:18 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 10 Oct 2014 10:51:14 +0000 (11:51 +0100)
frame-layer header is represented as a sequence of 32 bit unsigned
integer serialized in little-endian byte order, so framesize is on the
first 3 bytes.

SMPTE 421M Annex L.

https://bugzilla.gnome.org/show_bug.cgi?id=738243

gst/videoparsers/gstvc1parse.c

index 39fd6d0..cd828ed 100644 (file)
@@ -1053,7 +1053,7 @@ gst_vc1_parse_handle_frame (GstBaseParse * parse, GstBaseParseFrame * frame,
     /* frame-layer or sequence-layer-frame-layer */
     g_assert (size >= 8);
     /* Parse frame layer size */
-    framesize = GST_READ_UINT24_LE (data + 1) + 8;
+    framesize = GST_READ_UINT24_LE (data) + 8;
   }