matroskademux: Don't print warnings during flushing and stop as soon as possible

https://bugzilla.gnome.org//show_bug.cgi?id=705442
This commit is contained in:
Sebastian Dröge 2013-08-08 11:51:17 +02:00
parent 957c8e3e61
commit 9863e08839
2 changed files with 8 additions and 3 deletions

View file

@ -137,7 +137,10 @@ gst_ebml_peek_id_length (guint32 * _id, guint64 * _length, guint * _needed,
/* ERRORS */
peek_error:
{
GST_WARNING_OBJECT (el, "peek failed, ret = %d", ret);
if (ret != GST_FLOW_FLUSHING)
GST_WARNING_OBJECT (el, "peek failed, ret = %s", gst_flow_get_name (ret));
else
GST_DEBUG_OBJECT (el, "peek failed, ret = %s", gst_flow_get_name (ret));
*_needed = needed;
return ret;
}

View file

@ -4525,9 +4525,11 @@ gst_matroska_demux_loop (GstPad * pad)
ret = gst_matroska_read_common_peek_id_length_pull (&demux->common,
GST_ELEMENT_CAST (demux), &id, &length, &needed);
if (ret == GST_FLOW_EOS)
if (ret == GST_FLOW_EOS) {
goto eos;
if (ret != GST_FLOW_OK) {
} else if (ret == GST_FLOW_FLUSHING) {
goto pause;
} else if (ret != GST_FLOW_OK) {
if (gst_matroska_demux_check_parse_error (demux))
goto pause;
else