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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1498>
This commit is contained in:
Seungha Yang 2022-01-06 22:10:18 +09:00 committed by GStreamer Marge Bot
parent e63a3a7f31
commit a13309be4a

View file

@ -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);