summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2017-02-09 01:12:56 +1100
committerJan Schmidt <jan@centricular.com>2017-02-09 10:50:26 +1100
commitdc564727779c25eb81d3c81f32f0c4995cb92662 (patch)
tree8cdee8050fbce38e450a03c706e6a6869a887314 /gst-libs/gst
parent69d2f80954bf3b1432b22cb9bd982dd090c6b7c2 (diff)
downloadgstreamer-plugins-bad-dc564727779c25eb81d3c81f32f0c4995cb92662.tar.gz
adaptivedemux: Convert premature EOS on non-exposed pads to ERROR
If we need to send EOS on a pad that hasn't prerolled, generate an error on the bus instead, otherwise the app will have no idea. Fixes the HLS testFragmentNotFound test, which is waiting for either EOS or an error.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/adaptivedemux/gstadaptivedemux.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
index a63be65f0..4d8c2b071 100644
--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
+++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
@@ -3627,7 +3627,13 @@ gst_adaptive_demux_stream_download_loop (GstAdaptiveDemuxStream * stream)
end_of_manifest:
if (G_UNLIKELY (ret == GST_FLOW_EOS)) {
- gst_adaptive_demux_stream_push_event (stream, gst_event_new_eos ());
+ if (GST_OBJECT_PARENT (stream->pad) != NULL) {
+ GST_DEBUG_OBJECT (stream->src, "Pushing EOS on pad");
+ gst_adaptive_demux_stream_push_event (stream, gst_event_new_eos ());
+ } else {
+ GST_ERROR_OBJECT (demux, "Can't push EOS on non-exposed pad");
+ goto download_error;
+ }
}
end: