mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
decodebin3: Remove FIXME and do remove_input_stream() only for the corresponding parsebin
Do not remove other parsebin's input streams. It will cause unexpected removal of any input streams in multi-parsebin use case. Basically, the purpose of blocking buffers is similar to checking no-more-pads of chain/group. That is, it gives hint to know the timing to remove old (EOSed) streams of the parsebin and to add/reuse slots for new input streams. But, that doesn't mean that we need to remove other parsebin's EOSed stream. Each parsebin has most likely its own streaming thread and therefore EOSed time can be much different. (i.e., much early EOS of subtitle only parsebin) https://bugzilla.gnome.org/show_bug.cgi?id=785120
This commit is contained in:
parent
abe1183c17
commit
bf32c0b3b0
1 changed files with 7 additions and 2 deletions
|
@ -412,6 +412,11 @@ parsebin_buffer_probe (GstPad * pad, GstPadProbeInfo * info,
|
|||
DecodebinInputStream *input_stream = (DecodebinInputStream *) tmp->data;
|
||||
GList *next = tmp->next;
|
||||
|
||||
if (input_stream->input != input) {
|
||||
tmp = next;
|
||||
continue;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (dbin, "Checking input stream %p", input_stream);
|
||||
if (input_stream->input_buffer_probe_id) {
|
||||
GST_DEBUG_OBJECT (dbin,
|
||||
|
@ -542,11 +547,11 @@ parsebin_pad_added_cb (GstElement * demux, GstPad * pad, DecodebinInput * input)
|
|||
|
||||
input->pending_pads = g_list_append (input->pending_pads, ppad);
|
||||
|
||||
/* FIXME : ONLY DO FOR THIS PARSEBIN/INPUT ! */
|
||||
/* Check if all existing input streams have a buffer probe set */
|
||||
for (tmp = dbin->input_streams; tmp; tmp = tmp->next) {
|
||||
DecodebinInputStream *input_stream = (DecodebinInputStream *) tmp->data;
|
||||
if (input_stream->input_buffer_probe_id == 0) {
|
||||
if (input_stream->input == input &&
|
||||
input_stream->input_buffer_probe_id == 0) {
|
||||
GST_DEBUG_OBJECT (input_stream->srcpad, "Adding blocking buffer probe");
|
||||
input_stream->input_buffer_probe_id =
|
||||
gst_pad_add_probe (input_stream->srcpad,
|
||||
|
|
Loading…
Reference in a new issue