From a7e86751bf0c980fbdb8fb4db1acff5bec691a10 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 8 Dec 2014 15:18:25 +1100 Subject: [PATCH] videoaggregator: always try to use newer buffers instead of dropping them for being too old. This ensures that the newest buffer is always used for rendering --- gst-libs/gst/video/gstvideoaggregator.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c index 6a6cfcb253..91b9276767 100644 --- a/gst-libs/gst/video/gstvideoaggregator.c +++ b/gst-libs/gst/video/gstvideoaggregator.c @@ -1055,9 +1055,10 @@ gst_videoaggregator_fill_queues (GstVideoAggregator * vagg, gst_buffer_unref (buf); eos = FALSE; } else { + gst_buffer_replace (&pad->buffer, buf); GST_DEBUG_OBJECT (pad, - "Too old buffer -- dropping start %" GST_TIME_FORMAT " out end %" - GST_TIME_FORMAT, GST_TIME_ARGS (start_time), + "replacing old buffer with a newer buffer, start %" GST_TIME_FORMAT + " out end %" GST_TIME_FORMAT, GST_TIME_ARGS (start_time), GST_TIME_ARGS (output_end_time)); gst_buffer_unref (buf); buf = gst_aggregator_pad_steal_buffer (bpad);