mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
videooverlaycomposition: fix some refcounting and avoid possible NULL use
This commit is contained in:
parent
01270a447e
commit
0fba95a7b1
1 changed files with 3 additions and 1 deletions
|
@ -328,7 +328,9 @@ gst_video_buffer_set_overlay_composition (GstBuffer * buf,
|
||||||
ometa = (GstVideoOverlayCompositionMeta *)
|
ometa = (GstVideoOverlayCompositionMeta *)
|
||||||
gst_buffer_add_meta (buf, GST_VIDEO_OVERLAY_COMPOSITION_META_INFO,
|
gst_buffer_add_meta (buf, GST_VIDEO_OVERLAY_COMPOSITION_META_INFO,
|
||||||
NULL);
|
NULL);
|
||||||
ometa->overlay = comp;
|
/* buffer might not be writable or so */
|
||||||
|
if (ometa)
|
||||||
|
ometa->overlay = gst_video_overlay_composition_ref (comp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue