Commit a3a61f89 authored by Filippo Argiolas's avatar Filippo Argiolas
Browse files

v4l2src: clear format list in READY->NULL

Clear format list and probed caps when going to NULL so if a new device
is set we'll probe the formats again instead of using previously
detected ones. Fixes bug #591747.
parent 352e0716
......@@ -604,6 +604,10 @@ gst_v4l2_object_stop (GstV4l2Object * v4l2object)
if (!gst_v4l2_close (v4l2object))
return FALSE;
if (v4l2object->formats) {
gst_v4l2_object_clear_format_list (v4l2object);
return TRUE;
......@@ -760,6 +760,11 @@ gst_v4l2src_change_state (GstElement * element, GstStateChange transition)
/* close the device */
if (!gst_v4l2_object_stop (v4l2src->v4l2object))
if (v4l2src->probed_caps) {
gst_caps_unref (v4l2src->probed_caps);
v4l2src->probed_caps = NULL;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment