[0.10] gst-plugins-bad: codecparsers: fix offset issue in h263 parse

Tim Müller tpm at kemper.freedesktop.org
Thu Jan 5 15:08:47 PST 2012


Module: gst-plugins-bad
Branch: 0.10
Commit: 31f7363bdd12b2f8b52aafc0f2dbd048bac702ec
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=31f7363bdd12b2f8b52aafc0f2dbd048bac702ec

Author: Zhao Halley <halley.zhao at intel.com>
Date:   Thu Dec  8 12:07:42 2011 +0800

codecparsers: fix offset issue in h263 parse

---

 gst-libs/gst/codecparsers/gstmpeg4parser.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/gst-libs/gst/codecparsers/gstmpeg4parser.c b/gst-libs/gst/codecparsers/gstmpeg4parser.c
index 658f678..686ae93 100644
--- a/gst-libs/gst/codecparsers/gstmpeg4parser.c
+++ b/gst-libs/gst/codecparsers/gstmpeg4parser.c
@@ -524,7 +524,7 @@ gst_h263_parse (GstMpeg4Packet * packet,
   gint off1, off2;
   GstByteReader br;
 
-  gst_byte_reader_init (&br, data, size);
+  gst_byte_reader_init (&br, data + offset, size - offset);
 
   g_return_val_if_fail (packet != NULL, GST_MPEG4_PARSER_ERROR);
 
@@ -541,9 +541,10 @@ gst_h263_parse (GstMpeg4Packet * packet,
     return GST_MPEG4_PARSER_NO_PACKET;
   }
 
-  packet->offset = off1;
+  packet->offset = off1 + offset;
   packet->data = data;
 
+  gst_byte_reader_skip (&br, 3);
   off2 = find_psc (&br);
 
   if (off2 == -1) {



More information about the gstreamer-commits mailing list