mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
avidemux: push mode; handle some initial junk before hdrl list
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=685059
This commit is contained in:
parent
2c4b7e03a2
commit
b10829d6c8
1 changed files with 7 additions and 10 deletions
|
@ -3209,6 +3209,7 @@ gst_avi_demux_stream_header_push (GstAviDemux * avi)
|
||||||
|
|
||||||
switch (avi->header_state) {
|
switch (avi->header_state) {
|
||||||
case GST_AVI_DEMUX_HEADER_TAG_LIST:
|
case GST_AVI_DEMUX_HEADER_TAG_LIST:
|
||||||
|
again:
|
||||||
if (gst_avi_demux_peek_chunk (avi, &tag, &size)) {
|
if (gst_avi_demux_peek_chunk (avi, &tag, &size)) {
|
||||||
avi->offset += 8 + GST_ROUND_UP_2 (size);
|
avi->offset += 8 + GST_ROUND_UP_2 (size);
|
||||||
if (tag != GST_RIFF_TAG_LIST)
|
if (tag != GST_RIFF_TAG_LIST)
|
||||||
|
@ -3221,8 +3222,12 @@ gst_avi_demux_stream_header_push (GstAviDemux * avi)
|
||||||
|
|
||||||
gst_buffer_extract (buf, 0, fourcc, 4);
|
gst_buffer_extract (buf, 0, fourcc, 4);
|
||||||
|
|
||||||
if (GST_READ_UINT32_LE (fourcc) != GST_RIFF_LIST_hdrl)
|
if (GST_READ_UINT32_LE (fourcc) != GST_RIFF_LIST_hdrl) {
|
||||||
goto header_no_hdrl;
|
GST_WARNING_OBJECT (avi, "Invalid AVI header (no hdrl at start): %"
|
||||||
|
GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag));
|
||||||
|
gst_buffer_unref (buf);
|
||||||
|
goto again;
|
||||||
|
}
|
||||||
|
|
||||||
/* mind padding */
|
/* mind padding */
|
||||||
if (size & 1)
|
if (size & 1)
|
||||||
|
@ -3441,14 +3446,6 @@ header_no_list:
|
||||||
GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)));
|
GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)));
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
header_no_hdrl:
|
|
||||||
{
|
|
||||||
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, (NULL),
|
|
||||||
("Invalid AVI header (no hdrl at start): %"
|
|
||||||
GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)));
|
|
||||||
gst_buffer_unref (buf);
|
|
||||||
return GST_FLOW_ERROR;
|
|
||||||
}
|
|
||||||
header_no_avih:
|
header_no_avih:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, (NULL),
|
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, (NULL),
|
||||||
|
|
Loading…
Reference in a new issue