diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2009-08-10 13:30:23 +0200 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2009-08-10 14:41:52 +0200 |
commit | 96e72522fc1584fc65e0117d25d2c6bef937dced (patch) | |
tree | f6e22c52014037cb24c3041a60258dab8ab73c81 /gst/avi/gstavidemux.c | |
parent | f67db2a0894d421521ca4247b804f554711b18fb (diff) |
avidemux: push mode; cater for chunk padding
Diffstat (limited to 'gst/avi/gstavidemux.c')
-rw-r--r-- | gst/avi/gstavidemux.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index ad351bb2..4c7d4dc3 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); |