summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2016-11-22 17:14:44 +0100
committerEdward Hervey <bilboed@bilboed.com>2016-11-22 18:21:46 +0100
commit48a493070aec4b5426723a4a27f14eba107779cf (patch)
treeff2fb1ed3b8ff919f6901a3158bf2e0487f79048
parente7ff86665a8e2c77a676546accf07f44b005f0dc (diff)
asfdemux: Handle EOS in push-mode on corrupted files
It is possible no streams were activated when receiving EOS, if so handled it as if we hadn't seen the header https://bugzilla.gnome.org/show_bug.cgi?id=774846
-rw-r--r--gst/asfdemux/gstasfdemux.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c
index 09168a8c..e04f5be1 100644
--- a/gst/asfdemux/gstasfdemux.c
+++ b/gst/asfdemux/gstasfdemux.c
@@ -448,6 +448,13 @@ gst_asf_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
break;
}
flow = gst_asf_demux_push_complete_payloads (demux, TRUE);
+ if (!demux->activated_streams) {
+ /* If we still haven't got activated streams, the file is most likely corrupt */
+ GST_ELEMENT_ERROR (demux, STREAM, WRONG_TYPE,
+ (_("This stream contains no data.")),
+ ("got eos and didn't receive a complete header object"));
+ break;
+ }
if (flow < GST_FLOW_EOS || flow == GST_FLOW_NOT_LINKED) {
GST_ELEMENT_FLOW_ERROR (demux, flow);
break;