Commit 0fba95a7 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

videooverlaycomposition: fix some refcounting and avoid possible NULL use

parent 01270a44
......@@ -328,7 +328,9 @@ gst_video_buffer_set_overlay_composition (GstBuffer * buf,
ometa = (GstVideoOverlayCompositionMeta *)
gst_buffer_add_meta (buf, GST_VIDEO_OVERLAY_COMPOSITION_META_INFO,
NULL);
ometa->overlay = comp;
/* buffer might not be writable or so */
if (ometa)
ometa->overlay = gst_video_overlay_composition_ref (comp);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment