mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-02 14:36:41 +00:00
vc1parse: Avoid division by zero assertion
A framerate of 0/1 is valid, but we cannot calculate the frame duration in this context. Simply protect against this case. Related to #660
This commit is contained in:
parent
a5113fe8c8
commit
44322b1dfc
1 changed files with 3 additions and 2 deletions
|
@ -891,6 +891,7 @@ gst_vc1_parse_update_caps (GstVC1Parse * vc1parse)
|
||||||
gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION, vc1parse->fps_n,
|
gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION, vc1parse->fps_n,
|
||||||
vc1parse->fps_d, NULL);
|
vc1parse->fps_d, NULL);
|
||||||
|
|
||||||
|
if (vc1parse->fps_n > 0)
|
||||||
vc1parse->frame_duration = gst_util_uint64_scale (GST_SECOND,
|
vc1parse->frame_duration = gst_util_uint64_scale (GST_SECOND,
|
||||||
vc1parse->fps_d, vc1parse->fps_n);
|
vc1parse->fps_d, vc1parse->fps_n);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue