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
This commit is contained in:
Vincent Penquerc'h 2015-03-12 10:06:15 +00:00
parent 87fd62811d
commit c47004d3db

View file

@ -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;
}