amcvideodec: fix sync meta copying not taking a reference

Fixup for
9b9e39be24: amc: Fix crash when a sync_meta survives its sink
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/603

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1272>
This commit is contained in:
Matthew Waters 2020-05-15 13:52:06 +10:00
parent 4ccaa1ebbb
commit b3cbdb1d26

View file

@ -1239,7 +1239,7 @@ _amc_gl_copy (GstGLSyncMeta * src, GstBuffer * sbuffer, GstGLSyncMeta * dest,
g_mutex_lock (&sync->sink->gl_lock);
tmp->refcount = 1;
tmp->sink = sync->sink;
tmp->sink = gst_object_ref (sync->sink);
tmp->buffer = dbuffer;
tmp->oes_mem = (GstGLMemory *) gst_memory_ref ((GstMemory *) sync->oes_mem);
tmp->surface = g_object_ref (sync->surface);