mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
v4l2sink: destroy buffer pool when changing state to NULL
In the case we change the State from READY_TO_NULL the buffers in the pool still hold an open dup file descriptor to the device, therefore the device release function will not be called and the device will probably answer with -EBUSY when we reopen it in the next NULL_TO_READY transition. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> See bug #622500 and #612244.
This commit is contained in:
parent
8aed3176ce
commit
34c7cabe2c
1 changed files with 2 additions and 0 deletions
|
@ -461,6 +461,8 @@ gst_v4l2sink_change_state (GstElement * element, GstStateChange transition)
|
|||
}
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||
gst_v4l2_buffer_pool_destroy (v4l2sink->pool);
|
||||
v4l2sink->pool = NULL;
|
||||
/* close the device */
|
||||
if (!gst_v4l2_object_stop (v4l2sink->v4l2object))
|
||||
return GST_STATE_CHANGE_FAILURE;
|
||||
|
|
Loading…
Reference in a new issue