summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2017-06-27 10:25:42 +0200
committerEdward Hervey <bilboed@bilboed.com>2017-06-27 10:54:40 +0200
commit578fd2e077941ed1b168fa3b6f4262ed4f26ad42 (patch)
tree3cbb239368449802123840b2fe5e2714ff20caf1
parent53e145066bd6302f041880f2450d7549768d1976 (diff)
asfdemux; Don't assume index is present at end of file
Some files have garbage at the end of the file, don't error out if we don't find the index there. Reverts back to previous behaviour (where corrupted/missing indexex were not a fatal error). Regression introduced in 97294eb8bbed1b9dad7d3f2c52dd69eb1812cc06
-rw-r--r--gst/asfdemux/gstasfdemux.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c
index 2b0fed16..ff063a7b 100644
--- a/gst/asfdemux/gstasfdemux.c
+++ b/gst/asfdemux/gstasfdemux.c
@@ -1090,9 +1090,12 @@ gst_asf_demux_pull_indices (GstASFDemux * demux)
gst_buffer_map (buf, &map, GST_MAP_READ);
g_assert (map.size >= 16 + 8);
if (!asf_demux_peek_object (demux, map.data, 16 + 8, &obj, TRUE)) {
+ GST_DEBUG_OBJECT (demux, "No valid object, corrupted index, ignoring");
+ GST_MEMDUMP_OBJECT (demux, "Corrupted index ?", map.data, MIN (map.size,
+ 64));
gst_buffer_unmap (buf, &map);
gst_buffer_replace (&buf, NULL);
- ret = GST_FLOW_ERROR;
+ /* Non-fatal, return */
break;
}
gst_buffer_unmap (buf, &map);