v4l2src: minor GValue handling optimisation in probing code

This commit is contained in:
Tim-Philipp Müller 2014-05-12 17:23:19 +01:00
parent f63bdd0483
commit 2e5daf15e7

View file

@ -1767,8 +1767,7 @@ return_data:
gst_v4l2src_value_simplify (&rates); gst_v4l2src_value_simplify (&rates);
/* only change the framerate on the template when we have a valid probed new /* only change the framerate on the template when we have a valid probed new
* value */ * value */
gst_structure_set_value (s, "framerate", &rates); gst_structure_take_value (s, "framerate", &rates);
g_value_unset (&rates);
} else if (v4l2object->type == V4L2_BUF_TYPE_VIDEO_CAPTURE || } else if (v4l2object->type == V4L2_BUF_TYPE_VIDEO_CAPTURE ||
v4l2object->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { v4l2object->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
gst_structure_set (s, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 100, 1, gst_structure_set (s, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 100, 1,