From: Seungha Yang Date: Thu, 6 Jan 2022 13:10:18 +0000 (+0900) Subject: videoaggregator: Don't pass GAP buffer to prepare_frame_start() X-Git-Tag: 1.20.0~106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a13309be4a41f9625cadbfd77f0ff891ab255290;p=platform%2Fupstream%2Fgstreamer.git 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: --- 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);