From 7ce14b6bd89169cdeaadf65f0da74c90d3d67d92 Mon Sep 17 00:00:00 2001 From: Edgard Lima Date: Tue, 2 May 2006 21:52:48 +0000 Subject: [PATCH] Fix get_caps func to work when no framerate is available and the caps isn't simple. Original commit message from CVS: Fix get_caps func to work when no framerate is available and the caps isn't simple. --- sys/v4l2/gstv4l2src.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index 0f6f1a7fc6..126cd42171 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -675,15 +675,13 @@ gst_v4l2src_get_caps (GstBaseSrc * src) if (fps_n > 0) { gst_structure_set (structure, "framerate", GST_TYPE_FRACTION, fps_n, fps_d, NULL); + } else { + gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, + 1, 1, 100, 1, NULL); } gst_caps_append_structure (caps, structure); - if (fps_n <= 0) { - gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION_RANGE, - 1, 1, 100, 1, NULL); - } - } }