mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
nvenc: Fix crash with unspecified framerate
Nvidia driver seems to calculating floating point framerate without validation. This causes crash both on linux and Windows. Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1012
This commit is contained in:
parent
6c552030f7
commit
158b4d8649
1 changed files with 2 additions and 1 deletions
|
@ -1069,7 +1069,8 @@ gst_nv_base_enc_set_format (GstVideoEncoder * enc, GstVideoCodecState * state)
|
|||
params->frameRateNum = info->fps_n;
|
||||
params->frameRateDen = info->fps_d;
|
||||
} else {
|
||||
GST_FIXME_OBJECT (nvenc, "variable framerate");
|
||||
params->frameRateNum = 0;
|
||||
params->frameRateDen = 1;
|
||||
}
|
||||
|
||||
if (gst_util_fraction_multiply (GST_VIDEO_INFO_WIDTH (info),
|
||||
|
|
Loading…
Reference in a new issue