mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +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,8 +891,9 @@ gst_vc1_parse_update_caps (GstVC1Parse * vc1parse)
|
|||
gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION, vc1parse->fps_n,
|
||||
vc1parse->fps_d, NULL);
|
||||
|
||||
vc1parse->frame_duration = gst_util_uint64_scale (GST_SECOND,
|
||||
vc1parse->fps_d, vc1parse->fps_n);
|
||||
if (vc1parse->fps_n > 0)
|
||||
vc1parse->frame_duration = gst_util_uint64_scale (GST_SECOND,
|
||||
vc1parse->fps_d, vc1parse->fps_n);
|
||||
}
|
||||
|
||||
if (vc1parse->par_n != 0 && vc1parse->par_d != 0)
|
||||
|
|
Loading…
Reference in a new issue