basevideo: Fail if caps don't contain a framerate field
authorJan Schmidt <thaytan@noraisin.net>
Mon, 5 Oct 2009 14:47:58 +0000 (15:47 +0100)
committerJan Schmidt <thaytan@noraisin.net>
Mon, 5 Oct 2009 20:13:40 +0000 (21:13 +0100)
Return false from the caps parsing function if there is no framerate
field in the provided caps

gst-libs/gst/video/gstbasevideoutils.c

index 3de6038..0faed8a 100644 (file)
@@ -126,7 +126,8 @@ gst_base_video_state_from_caps (GstVideoState * state, GstCaps * caps)
   gst_video_format_parse_caps (caps, &state->format,
       &state->width, &state->height);
 
-  gst_video_parse_caps_framerate (caps, &state->fps_n, &state->fps_d);
+  if (!gst_video_parse_caps_framerate (caps, &state->fps_n, &state->fps_d))
+    return FALSE;
 
   state->par_n = 1;
   state->par_d = 1;