diff options
author | Jan Schmidt <thaytan@noraisin.net> | 2009-10-05 15:47:58 +0100 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-10-05 21:13:40 +0100 |
commit | b4fd433c5774663289ab921741101bbaa188ed8b (patch) | |
tree | 9f74fa7b5f107e9ffc3f7f913c10abc1ec873ec4 | |
parent | 196acecc04f76bdb26eab53c7494c771ec63b3a1 (diff) |
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
-rw-r--r-- | gst-libs/gst/video/gstbasevideoutils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gst-libs/gst/video/gstbasevideoutils.c b/gst-libs/gst/video/gstbasevideoutils.c index 3de6038c1..0faed8a36 100644 --- a/gst-libs/gst/video/gstbasevideoutils.c +++ b/gst-libs/gst/video/gstbasevideoutils.c @@ -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; |