diff options
author | Filippo Argiolas <filippo.argiolas@gmail.com> | 2009-08-14 10:11:25 +0200 |
---|---|---|
committer | Filippo Argiolas <filippo.argiolas@gmail.com> | 2009-08-14 10:15:43 +0200 |
commit | a3a61f89403cd39fd08f2f1d0e1475f55b0a48f4 (patch) | |
tree | 0f5a6ffb30163abbd84dd8f2afae01213540afd8 /sys/v4l2/gstv4l2src.c | |
parent | 352e07166070e4815332502f328d81f738fff244 (diff) |
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.
Diffstat (limited to 'sys/v4l2/gstv4l2src.c')
-rw-r--r-- | sys/v4l2/gstv4l2src.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index f0400518..2f0fef9e 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -760,6 +760,11 @@ gst_v4l2src_change_state (GstElement * element, GstStateChange transition) /* close the device */ if (!gst_v4l2_object_stop (v4l2src->v4l2object)) return GST_STATE_CHANGE_FAILURE; + + if (v4l2src->probed_caps) { + gst_caps_unref (v4l2src->probed_caps); + v4l2src->probed_caps = NULL; + } break; default: break; |