From: Alban Browaeys Date: Mon, 2 Apr 2012 17:31:20 +0000 (+0200) Subject: a52dec: fix first_access bigger than 2 X-Git-Tag: 1.19.3~505^2~794 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=43afed87526ce726b3732e7f883f27a59fdc752e;p=platform%2Fupstream%2Fgstreamer.git a52dec: fix first_access bigger than 2 gst_buffer_extract returns the number of bytes extracted, here 2 max. Set size to the buffer size as was done in 0.10 to avoid first_access error when it bypass 2. https://bugzilla.gnome.org/show_bug.cgi?id=673434 --- diff --git a/ext/a52dec/gsta52dec.c b/ext/a52dec/gsta52dec.c index f684721..290ae47 100644 --- a/ext/a52dec/gsta52dec.c +++ b/ext/a52dec/gsta52dec.c @@ -670,10 +670,11 @@ gst_a52dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) gint len; GstBuffer *subbuf; - size = gst_buffer_extract (buf, 0, data, 2); + size = gst_buffer_get_size (buf); if (size < 2) goto not_enough_data; + gst_buffer_extract (buf, 0, data, 2); first_access = (data[0] << 8) | data[1]; /* Skip the first_access header */