videooverlaycomposition: fix some refcounting and avoid possible NULL use

This commit is contained in:
Mark Nauwelaerts 2012-06-29 18:54:51 +02:00
parent 01270a447e
commit 0fba95a7b1

View file

@ -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);
}
}