From a7c46e4a08cf1134f67dd4dfb5e416394ed4c524 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Fri, 7 Apr 2017 18:49:52 +0200 Subject: [PATCH] videoaggregator: Do not mix the same buffer twice when EOS. When entering this code path, we know that: We received EOS on this pad. We consumed all its buffers. In any case, we want to replace vaggpad->buffer with NULL, otherwise we will end up mixing the same buffer twice. https://bugzilla.gnome.org/show_bug.cgi?id=781037 --- gst-libs/gst/video/gstvideoaggregator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c index 2abb4d569b..e17c111d45 100644 --- a/gst-libs/gst/video/gstvideoaggregator.c +++ b/gst-libs/gst/video/gstvideoaggregator.c @@ -1268,7 +1268,9 @@ gst_video_aggregator_fill_queues (GstVideoAggregator * vagg, } else if (is_eos) { eos = FALSE; } - } else if (is_eos) { + } + + if (is_eos) { gst_buffer_replace (&pad->buffer, NULL); } }