glcolorconvert: update existing sync meta if outbuf has one

Instead of always adding a new one, which means the buffer could end up
with multiple sync meta instances.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6942>
This commit is contained in:
Jakub Adam 2024-05-24 17:32:21 +02:00 committed by GStreamer Marge Bot
parent 529f2472b3
commit 859b1c8b63

View file

@ -3798,10 +3798,12 @@ _do_convert (GstGLContext * context, GstGLColorConvert * convert)
return;
}
sync_meta = gst_buffer_add_gl_sync_meta (convert->context, convert->outbuf);
if (sync_meta)
gst_gl_sync_meta_set_sync_point (sync_meta, convert->context);
sync_meta = gst_buffer_get_gl_sync_meta (convert->outbuf);
if (!sync_meta) {
sync_meta = gst_buffer_add_gl_sync_meta (convert->context,
convert->outbuf);
}
gst_gl_sync_meta_set_sync_point (sync_meta, convert->context);
composition_meta =
gst_buffer_get_video_overlay_composition_meta (convert->inbuf);