mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
asfdemux: More index handling
In the same vein as the previous commit, the end of the file might have been
cut and therefore contains bogus data.
If the object is too short, consider it as garbage and return a non-fatal
flow.
Regression introduced in 97294eb8bb
This commit is contained in:
parent
0bbdfa8ee9
commit
ec24f4c9f2
1 changed files with 9 additions and 1 deletions
|
@ -1124,13 +1124,21 @@ gst_asf_demux_pull_indices (GstASFDemux * demux)
|
|||
gst_buffer_unmap (buf, &map);
|
||||
gst_buffer_replace (&buf, NULL);
|
||||
|
||||
if (ret == ASF_FLOW_NEED_MORE_DATA) {
|
||||
/* Since indices are at the end of the file, if we need more data,
|
||||
* we consider it as a non-fatal corrupted index */
|
||||
ret = GST_FLOW_OK;
|
||||
break;
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (ret != GST_FLOW_OK))
|
||||
break;
|
||||
|
||||
++num_read;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (demux, "read %u index objects", num_read);
|
||||
GST_DEBUG_OBJECT (demux, "read %u index objects , returning %s", num_read,
|
||||
gst_flow_get_name (ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue