From e945b3706c86aa13d05d195a1170e6277a247548 Mon Sep 17 00:00:00 2001 From: uno20001 Date: Wed, 27 May 2020 15:11:17 +0200 Subject: [PATCH] decodebin: only emit 'drained' signal when top chain is drained Without this, decodebin emits 'drained' multiple times which then causes (uri)playbin to emit 'about-to-finish' multiple times for for file types. Fixes #751 Part-of: --- gst/playback/gstdecodebin2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 46f9a7f..2d8314f 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -4249,7 +4249,7 @@ beach: *drained = chain->drained; - if (*drained) + if (*drained && !chain->parent) /* only emit signal from top chain */ g_signal_emit (dbin, gst_decode_bin_signals[SIGNAL_DRAINED], 0, NULL); return handled; -- 2.7.4