From 3fd44b2dde996dfaefbc95063c175a57df54ae74 Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Fri, 15 Jan 2016 11:44:52 +0000 Subject: [PATCH] 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. --- gst/segmentclip/gstvideosegmentclip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/segmentclip/gstvideosegmentclip.c b/gst/segmentclip/gstvideosegmentclip.c index 7430a65da1..0b168e48e7 100644 --- a/gst/segmentclip/gstvideosegmentclip.c +++ b/gst/segmentclip/gstvideosegmentclip.c @@ -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); -- 2.34.1