v4l2sink: Protect against NULL-pointer access
gst_v4l2sink_change_state() would free the pool without checking whether there was a valid pool...
This commit is contained in:
parent
0aace5a0f3
commit
4ba93e9f1a
@ -461,7 +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);
|
||||
if (NULL != v4l2sink->pool)
|
||||
gst_v4l2_buffer_pool_destroy (v4l2sink->pool);
|
||||
v4l2sink->pool = NULL;
|
||||
/* close the device */
|
||||
if (!gst_v4l2_object_stop (v4l2sink->v4l2object))
|
||||
|
Loading…
x
Reference in New Issue
Block a user