diff options
author | Edgard Lima <edgard.lima@indt.org.br> | 2006-05-02 21:52:48 +0000 |
---|---|---|
committer | Edgard Lima <edgard.lima@indt.org.br> | 2006-05-02 21:52:48 +0000 |
commit | f2ff9c1617fcf25df3deaf67841e4cf58508e0fa (patch) | |
tree | 8865ab6da895db741b8d00fcae2f32f6258ef398 /sys/v4l2 | |
parent | 3281a636374c4baeab2cdbd31991744198cd62cf (diff) | |
download | gst-plugins-bad-f2ff9c1617fcf25df3deaf67841e4cf58508e0fa.tar.gz gst-plugins-bad-f2ff9c1617fcf25df3deaf67841e4cf58508e0fa.tar.bz2 gst-plugins-bad-f2ff9c1617fcf25df3deaf67841e4cf58508e0fa.zip |
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.
Diffstat (limited to 'sys/v4l2')
-rw-r--r-- | sys/v4l2/gstv4l2src.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index 0f6f1a7f..126cd421 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); - } - } } |