Commit c0c80438 authored by Seungha Yang's avatar Seungha Yang 🐑 Committed by Tim-Philipp Müller
Browse files

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: <gstreamer/gst-plugins-bad!2109>
parent 0cfbf7ad
Pipeline #290074 passed with stages
in 27 minutes and 41 seconds
......@@ -154,8 +154,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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment