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,6 +461,7 @@ gst_v4l2sink_change_state (GstElement * element, GstStateChange transition)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
|
if (NULL != v4l2sink->pool)
|
||||||
gst_v4l2_buffer_pool_destroy (v4l2sink->pool);
|
gst_v4l2_buffer_pool_destroy (v4l2sink->pool);
|
||||||
v4l2sink->pool = NULL;
|
v4l2sink->pool = NULL;
|
||||||
/* close the device */
|
/* close the device */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user