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/6962>
This commit is contained in:
Jakub Adam 2024-05-24 17:32:21 +02:00 committed by GStreamer Marge Bot
parent 48f63a9c64
commit c305fe7a35

View file

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