From efb8a4324cfa952b7dda4b71c2511397dfffb06b Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 5 Oct 2009 15:47:58 +0100 Subject: [PATCH] basevideo: Fail if caps don't contain a framerate field Return false from the caps parsing function if there is no framerate field in the provided caps Merging previous commit into current codebase. --- gst-libs/gst/video/gstbasevideoutils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/gstbasevideoutils.c b/gst-libs/gst/video/gstbasevideoutils.c index 69f614b28c..9ae9d2fa1b 100644 --- a/gst-libs/gst/video/gstbasevideoutils.c +++ b/gst-libs/gst/video/gstbasevideoutils.c @@ -128,7 +128,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;