From c47004d3db7c5d4de5a5677f91b65f512acba30d Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Thu, 12 Mar 2015 10:06:15 +0000 Subject: [PATCH] oggdemux: recover from EOS when searching for chain in push mode If we get EOS when we're trying to build a chain, we disable seeking and continue instead of posting an error. This can happen for corner cases such as a stream with a video that stops before the end, for instance. https://bugzilla.gnome.org/show_bug.cgi?id=745980 --- ext/ogg/gstoggdemux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index 64606c029d..7e55d05379 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -2351,8 +2351,10 @@ gst_ogg_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) #endif res = gst_ogg_demux_send_event (ogg, event); if (ogg->current_chain == NULL) { - GST_ELEMENT_ERROR (ogg, STREAM, DEMUX, (NULL), - ("can't get first chain")); + GST_WARNING_OBJECT (ogg, + "EOS while trying to retrieve chain, seeking disabled"); + ogg->push_disable_seeking = TRUE; + res = TRUE; } break; }