decodebin3: Clear saw_eos flag of DecodebinInputStream by FLUSH event

Likewise how GstPad is doing, saw_eos flag of DecodebinInputStream
must be cleared by FLUSH event.

https://bugzilla.gnome.org/show_bug.cgi?id=774343
This commit is contained in:
Seungha Yang 2016-11-13 13:15:38 +09:00 committed by Jan Schmidt
parent 8b95d17f75
commit 364a45267e

View file

@ -274,6 +274,9 @@ parse_chain_output_probe (GstPad * pad, GstPadProbeInfo * info,
} }
} }
break; break;
case GST_EVENT_FLUSH_STOP:
GST_DEBUG_OBJECT (pad, "Clear saw_eos flag");
input->saw_eos = FALSE;
default: default:
break; break;
} }
@ -327,10 +330,11 @@ create_input_stream (GstDecodebin3 * dbin, GstStream * stream, GstPad * pad,
res->pending_stream = gst_object_ref (stream); res->pending_stream = gst_object_ref (stream);
res->srcpad = pad; res->srcpad = pad;
/* Put probe on output source pad (for detecting EOS/STREAM_START) */ /* Put probe on output source pad (for detecting EOS/STREAM_START/FLUSH) */
res->output_event_probe_id = res->output_event_probe_id =
gst_pad_add_probe (pad, gst_pad_add_probe (pad,
GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM | GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM | GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM
| GST_PAD_PROBE_TYPE_EVENT_FLUSH,
(GstPadProbeCallback) parse_chain_output_probe, res, NULL); (GstPadProbeCallback) parse_chain_output_probe, res, NULL);
/* Add to list of current input streams */ /* Add to list of current input streams */