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
This commit is contained in:
Matthew Waters 2014-12-08 15:18:25 +11:00 committed by Sebastian Dröge
parent e8fda3a28a
commit 8fe8510d80

View file

@ -1055,9 +1055,10 @@ gst_videoaggregator_fill_queues (GstVideoAggregator * vagg,
gst_buffer_unref (buf); gst_buffer_unref (buf);
eos = FALSE; eos = FALSE;
} else { } else {
gst_buffer_replace (&pad->buffer, buf);
GST_DEBUG_OBJECT (pad, GST_DEBUG_OBJECT (pad,
"Too old buffer -- dropping start %" GST_TIME_FORMAT " out end %" "replacing old buffer with a newer buffer, start %" GST_TIME_FORMAT
GST_TIME_FORMAT, GST_TIME_ARGS (start_time), " out end %" GST_TIME_FORMAT, GST_TIME_ARGS (start_time),
GST_TIME_ARGS (output_end_time)); GST_TIME_ARGS (output_end_time));
gst_buffer_unref (buf); gst_buffer_unref (buf);
buf = gst_aggregator_pad_steal_buffer (bpad); buf = gst_aggregator_pad_steal_buffer (bpad);