videosegmentclip: fail to set_caps if problem in caps structure

gst_video_segment_clip_set_caps () should return FALSE if there was a
problem reading the framerate values from the caps structure.
This commit is contained in:
Luis de Bethencourt 2016-01-15 11:44:52 +00:00
parent a8b4c6c4ff
commit 3fd44b2dde

View file

@ -167,8 +167,8 @@ gst_video_segment_clip_set_caps (GstSegmentClip * base, GstCaps * caps)
s = gst_caps_get_structure (caps, 0);
ret = gst_structure_get_fraction (s, "framerate", &fps_n, &fps_d);
ret = (fps_d != 0);
ret = gst_structure_get_fraction (s, "framerate", &fps_n, &fps_d)
&& (fps_d != 0);
if (ret) {
GST_DEBUG_OBJECT (self, "Configured framerate %d/%d", fps_n, fps_d);