v4l2bufferpool: don't ref the newly created allocator

Otherwise the allocator will never be deleted.

https://bugzilla.gnome.org/show_bug.cgi?id=712612
This commit is contained in:
Michael Olbrich 2014-01-17 07:46:09 +01:00 committed by Nicolas Dufresne
parent 809d105982
commit 3d2bd4ff49

View file

@ -470,11 +470,13 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config)
if (obj->mode == GST_V4L2_IO_DMABUF)
allocator = gst_dmabuf_allocator_new ();
else if (allocator)
gst_object_ref (allocator);
if (pool->allocator)
gst_object_unref (pool->allocator);
if ((pool->allocator = allocator))
gst_object_ref (allocator);
pool->allocator = allocator;
pool->params = params;
gst_buffer_pool_config_set_params (config, caps, size, min_buffers,