summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2014-05-24 23:49:19 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2014-05-25 00:05:56 -0400
commitffb7a787989b5c3cb58ba678017a2be6eebaa0c0 (patch)
tree8609ea24855a37728f84f50dd8c611f6532632f2 /sys
parent66519d08b01be89431727f70e74e3ab02037c7b1 (diff)
downloadgstreamer-plugins-good-ffb7a787989b5c3cb58ba678017a2be6eebaa0c0.tar.gz
v4l2object: Simply read back the config to update the query
It's easy to get the min/max outdate when hacking decide allocation. In order to avoid this, simply read back the choosen value from the config.
Diffstat (limited to 'sys')
-rw-r--r--sys/v4l2/gstv4l2object.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index a311f49bc..7ab1dc17d 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -3264,10 +3264,6 @@ gst_v4l2_object_decide_allocation (GstV4l2Object * obj, GstQuery * query)
* driver and 1 more, so we don't endup up with everything downstream or
* held by the decoder. */
own_min = min + obj->min_buffers_for_capture + 1;
-
- /* Update min/max so the base class does not reset our settings */
- min = own_min;
- max = 0;
} else {
/* In this case we'll have to configure two buffer pool. For our buffer
* pool, we'll need what the driver one, and one more, so we can dequeu */
@@ -3361,6 +3357,12 @@ setup_other_pool:
}
}
+ /* For simplicity, simply read back the active configuration, so our base
+ * class get the right information */
+ config = gst_buffer_pool_get_config (pool);
+ gst_buffer_pool_config_get_params (config, NULL, &size, &min, &max);
+ gst_structure_free (config);
+
done:
if (update)
gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max);