mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
v4l2: fix flushing start and stop
Move the flushing calls to the right place in the bufferpool. Fix the min and max buffer sizes.
This commit is contained in:
parent
0a88ac4c92
commit
e6a8718f0c
2 changed files with 6 additions and 4 deletions
|
@ -240,8 +240,8 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config)
|
|||
GST_DEBUG_OBJECT (pool, "config %" GST_PTR_FORMAT, config);
|
||||
|
||||
pool->size = size;
|
||||
pool->min_buffers = min_buffers;
|
||||
pool->max_buffers = max_buffers;
|
||||
pool->max_buffers = MAX (min_buffers, max_buffers);
|
||||
pool->min_buffers = MIN (pool->max_buffers, min_buffers);
|
||||
pool->prefix = prefix;
|
||||
pool->align = align;
|
||||
|
||||
|
@ -360,6 +360,8 @@ gst_v4l2_buffer_pool_start (GstBufferPool * bpool)
|
|||
if (!start_streaming (pool))
|
||||
goto start_failed;
|
||||
|
||||
gst_poll_set_flushing (obj->poll, FALSE);
|
||||
|
||||
return TRUE;
|
||||
|
||||
/* ERRORS */
|
||||
|
@ -398,6 +400,8 @@ gst_v4l2_buffer_pool_stop (GstBufferPool * bpool)
|
|||
|
||||
GST_DEBUG_OBJECT (pool, "stopping pool");
|
||||
|
||||
gst_poll_set_flushing (obj->poll, TRUE);
|
||||
|
||||
if (pool->streaming) {
|
||||
switch (obj->mode) {
|
||||
case GST_V4L2_IO_RW:
|
||||
|
|
|
@ -2418,8 +2418,6 @@ gst_v4l2_object_stop (GstV4l2Object * v4l2object)
|
|||
if (!GST_V4L2_IS_ACTIVE (v4l2object))
|
||||
goto done;
|
||||
|
||||
gst_poll_set_flushing (v4l2object->poll, TRUE);
|
||||
|
||||
if (v4l2object->pool) {
|
||||
GST_DEBUG_OBJECT (v4l2object->element, "deactivating pool");
|
||||
gst_buffer_pool_set_active (v4l2object->pool, FALSE);
|
||||
|
|
Loading…
Reference in a new issue