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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/673>
This commit is contained in:
uno20001 2020-05-27 15:11:17 +02:00 committed by GStreamer Merge Bot
parent 8966083178
commit e945b3706c

View file

@ -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;