mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
v4l2object: Orphan buffer pool on object_stop if supported
Use V4L2 buffer orphaning, on recent kernels so that the device can be restarted immediately with a new buffer pool during renogatiation.
This commit is contained in:
parent
50dfbf1c0d
commit
a493bcd549
1 changed files with 5 additions and 3 deletions
|
@ -4158,9 +4158,11 @@ gst_v4l2_object_stop (GstV4l2Object * v4l2object)
|
|||
goto done;
|
||||
|
||||
if (v4l2object->pool) {
|
||||
GST_DEBUG_OBJECT (v4l2object->dbg_obj, "deactivating pool");
|
||||
gst_buffer_pool_set_active (v4l2object->pool, FALSE);
|
||||
gst_object_unref (v4l2object->pool);
|
||||
if (!gst_v4l2_buffer_pool_orphan (&v4l2object->pool)) {
|
||||
GST_DEBUG_OBJECT (v4l2object->dbg_obj, "deactivating pool");
|
||||
gst_buffer_pool_set_active (v4l2object->pool, FALSE);
|
||||
gst_object_unref (v4l2object->pool);
|
||||
}
|
||||
v4l2object->pool = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue