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.
This commit is contained in:
Jan Schmidt 2017-02-09 01:12:56 +11:00
parent 69d2f80954
commit dc56472777

View file

@ -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: