mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 08:08:22 +00:00
Don't do crazy things with 0/1 framerates
We use 0/1 framerates to mark variable framerates and matroskamux should not try to calculate a frame duration for it. Fixes #571294.
This commit is contained in:
parent
bde39c955f
commit
b9adb5846b
1 changed files with 2 additions and 1 deletions
|
@ -650,7 +650,8 @@ gst_matroska_mux_video_pad_setcaps (GstPad * pad, GstCaps * caps)
|
|||
gst_structure_get_int (structure, "height", &height);
|
||||
videocontext->pixel_width = width;
|
||||
videocontext->pixel_height = height;
|
||||
if (gst_structure_get_fraction (structure, "framerate", &fps_n, &fps_d)) {
|
||||
if (gst_structure_get_fraction (structure, "framerate", &fps_n, &fps_d)
|
||||
&& fps_n > 0) {
|
||||
context->default_duration =
|
||||
gst_util_uint64_scale_int (GST_SECOND, fps_d, fps_n);
|
||||
GST_LOG_OBJECT (pad, "default duration = %" GST_TIME_FORMAT,
|
||||
|
|
Loading…
Reference in a new issue