mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
mfvideoenc: Don't pass 0/1 framerate to MFT
Some MFT implementations do not accept 0/1 framerate and it will result in encoder open failure. If framerate is unknown, we will use arbitrary 25/1 framerate value. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2106>
This commit is contained in:
parent
90181642a3
commit
cc7bb86aa6
1 changed files with 5 additions and 2 deletions
|
@ -320,8 +320,11 @@ gst_mf_video_enc_set_format (GstVideoEncoder * enc, GstVideoCodecState * state)
|
|||
|
||||
fps_n = GST_VIDEO_INFO_FPS_N (info);
|
||||
fps_d = GST_VIDEO_INFO_FPS_D (info);
|
||||
if (fps_n == 0 || fps_d == 0) {
|
||||
fps_n = 0;
|
||||
if (fps_n <= 0 || fps_d <= 0) {
|
||||
/* XXX: not sure why. NVIDIA MFT accepts 0/1 framerate, but Intel or
|
||||
* Microsoft's software MFT doesn't accept 0/1 framerate.
|
||||
* Need to set something meaningful value here therefore */
|
||||
fps_n = 25;
|
||||
fps_d = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue