summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f3f8a26)
raw | patch | inline | side by side (parent: f3f8a26)
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Thu, 23 Aug 2012 17:35:31 +0000 (17:35 +0000) | ||
committer | Nikhil Devshatwar <a0132237@ti.com> | |
Wed, 15 May 2013 13:18:16 +0000 (18:48 +0530) |
As the comment in gst_drm_buffer_initialize says, gst_buffer_set_dma_buf
does not take ownership of the passed dmabuf, so unref it when done.
does not take ownership of the passed dmabuf, so unref it when done.
gst-libs/gst/drm/gstdrmbufferpool.c | patch | blob | history |
index 67810fbadeb60c157785e34c54b52cd5abd61bee..9a4eb414ad00bfecc10dfc6bc1d6318a881f2727 100644 (file)
gst_drm_buffer_initialize (GstDRMBuffer * self,
GstDRMBufferPool * pool, struct omap_bo * bo)
{
+ GstDmaBuf *dmabuf;
+
self->bo = bo;
GST_BUFFER_DATA (self) = omap_bo_map (self->bo);
* plugins can access for zero copy hw accel:
*/
// XXX buffer doesn't take ownership of the GstDmaBuf...
- gst_buffer_set_dma_buf (GST_BUFFER (self),
- gst_dma_buf_new (omap_bo_dmabuf (self->bo)));
+ dmabuf = gst_dma_buf_new (omap_bo_dmabuf (self->bo));
+ gst_buffer_set_dma_buf (GST_BUFFER (self), dmabuf);
+ gst_dma_buf_unref (dmabuf);
gst_drm_buffer_set_pool (self, pool);
}