From 96e72522fc1584fc65e0117d25d2c6bef937dced Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 10 Aug 2009 13:30:23 +0200 Subject: [PATCH] avidemux: push mode; cater for chunk padding --- gst/avi/gstavidemux.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index ad351bb2ae..4c7d4dc3c4 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -2971,6 +2971,10 @@ gst_avi_demux_stream_header_push (GstAviDemux * avi) if (GST_READ_UINT32_LE (GST_BUFFER_DATA (buf)) != GST_RIFF_LIST_hdrl) goto header_no_hdrl; + /* mind padding */ + if (size & 1) + gst_adapter_flush (avi->adapter, 1); + GST_DEBUG ("'hdrl' LIST tag found. Parsing next chunk"); /* the hdrl starts with a 'avih' header */ @@ -3078,6 +3082,9 @@ gst_avi_demux_stream_header_push (GstAviDemux * avi) gst_adapter_flush (avi->adapter, 12); if (size > 4) { buf = gst_adapter_take_buffer (avi->adapter, size - 4); + /* mind padding */ + if (size & 1) + gst_adapter_flush (avi->adapter, 1); gst_riff_parse_info (GST_ELEMENT (avi), buf, &avi->globaltags); gst_buffer_unref (buf);