mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-13 09:45:27 +00:00
v4l2: update for get_param
Remove const from the GstCaps. Plug some GstStructure leaks
This commit is contained in:
parent
eccb5b8fed
commit
098d8ceae7
3 changed files with 5 additions and 3 deletions
|
@ -242,7 +242,7 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config)
|
||||||
{
|
{
|
||||||
GstV4l2BufferPool *pool = GST_V4L2_BUFFER_POOL (bpool);
|
GstV4l2BufferPool *pool = GST_V4L2_BUFFER_POOL (bpool);
|
||||||
GstV4l2Object *obj = pool->obj;
|
GstV4l2Object *obj = pool->obj;
|
||||||
const GstCaps *caps;
|
GstCaps *caps;
|
||||||
guint size, min_buffers, max_buffers;
|
guint size, min_buffers, max_buffers;
|
||||||
GstAllocator *allocator;
|
GstAllocator *allocator;
|
||||||
GstAllocationParams params;
|
GstAllocationParams params;
|
||||||
|
|
|
@ -635,7 +635,7 @@ gst_v4l2sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
|
||||||
gst_object_ref (pool);
|
gst_object_ref (pool);
|
||||||
|
|
||||||
if (pool != NULL) {
|
if (pool != NULL) {
|
||||||
const GstCaps *pcaps;
|
GstCaps *pcaps;
|
||||||
GstStructure *config;
|
GstStructure *config;
|
||||||
|
|
||||||
/* we had a pool, check caps */
|
/* we had a pool, check caps */
|
||||||
|
@ -645,9 +645,11 @@ gst_v4l2sink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
|
||||||
GST_DEBUG_OBJECT (v4l2sink,
|
GST_DEBUG_OBJECT (v4l2sink,
|
||||||
"we had a pool with caps %" GST_PTR_FORMAT, pcaps);
|
"we had a pool with caps %" GST_PTR_FORMAT, pcaps);
|
||||||
if (!gst_caps_is_equal (caps, pcaps)) {
|
if (!gst_caps_is_equal (caps, pcaps)) {
|
||||||
|
gst_structure_free (config);
|
||||||
gst_object_unref (pool);
|
gst_object_unref (pool);
|
||||||
goto different_caps;
|
goto different_caps;
|
||||||
}
|
}
|
||||||
|
gst_structure_free (config);
|
||||||
}
|
}
|
||||||
/* we need at least 2 buffers to operate */
|
/* we need at least 2 buffers to operate */
|
||||||
gst_query_add_allocation_pool (query, pool, size, 2, 0);
|
gst_query_add_allocation_pool (query, pool, size, 2, 0);
|
||||||
|
|
|
@ -573,7 +573,7 @@ gst_v4l2src_decide_allocation (GstBaseSrc * bsrc, GstQuery * query)
|
||||||
|
|
||||||
if (pool) {
|
if (pool) {
|
||||||
GstStructure *config;
|
GstStructure *config;
|
||||||
const GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
|
||||||
config = gst_buffer_pool_get_config (pool);
|
config = gst_buffer_pool_get_config (pool);
|
||||||
gst_buffer_pool_config_get_params (config, &caps, NULL, NULL, NULL);
|
gst_buffer_pool_config_get_params (config, &caps, NULL, NULL, NULL);
|
||||||
|
|
Loading…
Reference in a new issue