From a13309be4a41f9625cadbfd77f0ff891ab255290 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Thu, 6 Jan 2022 22:10:18 +0900 Subject: [PATCH] videoaggregator: Don't pass GAP buffer to prepare_frame_start() Likewise we do check the same condition in prepare_frames_finish(), ignore GAP buffer (zero size with GST_BUFFER_FLAG_GAP flag) without any further processing. Part-of: --- .../gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c b/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c index cbad92d..a8e100a 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c @@ -2009,6 +2009,13 @@ prepare_frames_start (GstElement * agg, GstPad * pad, gpointer user_data) if (vpad->priv->buffer == NULL || !vaggpad_class->prepare_frame_start) return TRUE; + /* GAP event, nothing to do */ + if (vpad->priv->buffer && + gst_buffer_get_size (vpad->priv->buffer) == 0 && + GST_BUFFER_FLAG_IS_SET (vpad->priv->buffer, GST_BUFFER_FLAG_GAP)) { + return TRUE; + } + g_return_val_if_fail (vaggpad_class->prepare_frame_start && vaggpad_class->prepare_frame_finish, TRUE); -- 2.7.4