From: Zhao Halley Date: Thu, 8 Dec 2011 04:07:42 +0000 (+0800) Subject: codecparsers: fix offset issue in h263 parse X-Git-Tag: RELEASE-0.11.1~97^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=052d1ace5e617015af99663b1bcd9f13d462b41d;p=platform%2Fupstream%2Fgst-plugins-bad.git codecparsers: fix offset issue in h263 parse --- 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) {