mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-07 19:22:15 +00:00
v4l2: only to STREAMOFF when streaming
Only call STREAMOFF when we previously called STREAMON
This commit is contained in:
parent
83bc5e0765
commit
b98bc75f47
1 changed files with 17 additions and 16 deletions
|
@ -398,24 +398,25 @@ gst_v4l2_buffer_pool_stop (GstBufferPool * bpool)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (pool, "stopping pool");
|
GST_DEBUG_OBJECT (pool, "stopping pool");
|
||||||
|
|
||||||
switch (obj->mode) {
|
if (pool->streaming) {
|
||||||
case GST_V4L2_IO_RW:
|
switch (obj->mode) {
|
||||||
break;
|
case GST_V4L2_IO_RW:
|
||||||
case GST_V4L2_IO_MMAP:
|
break;
|
||||||
case GST_V4L2_IO_USERPTR:
|
case GST_V4L2_IO_MMAP:
|
||||||
/* we actually need to sync on all queued buffers but not
|
case GST_V4L2_IO_USERPTR:
|
||||||
* on the non-queued ones */
|
/* we actually need to sync on all queued buffers but not
|
||||||
GST_DEBUG_OBJECT (pool, "STREAMOFF");
|
* on the non-queued ones */
|
||||||
if (v4l2_ioctl (pool->video_fd, VIDIOC_STREAMOFF, &obj->type) < 0)
|
GST_DEBUG_OBJECT (pool, "STREAMOFF");
|
||||||
goto stop_failed;
|
if (v4l2_ioctl (pool->video_fd, VIDIOC_STREAMOFF, &obj->type) < 0)
|
||||||
break;
|
goto stop_failed;
|
||||||
default:
|
break;
|
||||||
g_assert_not_reached ();
|
default:
|
||||||
break;
|
g_assert_not_reached ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
pool->streaming = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
pool->streaming = FALSE;
|
|
||||||
|
|
||||||
/* first free the buffers in the queue */
|
/* first free the buffers in the queue */
|
||||||
ret = GST_BUFFER_POOL_CLASS (parent_class)->stop (bpool);
|
ret = GST_BUFFER_POOL_CLASS (parent_class)->stop (bpool);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue