oggdemux: do not throw a flow error on flushing

If the streaming task attempts to read a chain while the pipeline
is stopping (which can happen if the pipeline stops shortly after
start or a new URI being setup in gapless playback case), it will
see a flushing return from upstream, and should then also return
flushing to the caller, rather than emit a flow error.

https://bugzilla.gnome.org/show_bug.cgi?id=722442
This commit is contained in:
Vincent Penquerc'h 2015-01-29 17:58:27 +00:00
parent 4e44f37abd
commit 9491157f1a

View file

@ -4094,8 +4094,12 @@ gst_ogg_demux_find_chains (GstOggDemux * ogg)
* ogg file. */
gst_ogg_demux_seek (ogg, 0);
ret = gst_ogg_demux_read_chain (ogg, &chain);
if (ret != GST_FLOW_OK)
goto no_first_chain;
if (ret != GST_FLOW_OK) {
if (ret == GST_FLOW_FLUSHING)
goto flushing;
else
goto no_first_chain;
}
/* read page from end offset, we use this page to check if its serial
* number is contained in the first chain. If this is the case then
@ -4155,6 +4159,11 @@ no_last_page:
gst_ogg_chain_free (chain);
return ret;
}
flushing:
{
GST_DEBUG_OBJECT (ogg, "Flushing, can't read chain");
return GST_FLOW_FLUSHING;
}
}
static void