From: Damian Hobson-Garcia Date: Mon, 27 May 2019 09:08:54 +0000 (+0900) Subject: v4l2object: Orphan buffer pool on object_stop if supported X-Git-Tag: 1.16.2~38 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fgst-plugins-good.git;a=commitdiff_plain;h=d20a82aa10c347ffce172098dfa97bb61c04c8ca 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. --- diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index 01c5abf..dad426a 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -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; }