ffmpegencoder: use qstring rather than sprint_s (which is only available on msvc)

This commit is contained in:
itsmattkc
2020-04-30 18:54:13 +10:00
parent ce42388d68
commit 549ecc448a
+2 -3
View File
@@ -473,9 +473,8 @@ bool FFmpegEncoder::SetupCodecContext(AVStream* stream, AVCodecContext* codec_ct
if (params().video_threads() == 0) {
av_dict_set(&codec_opts, "threads", "auto", 0);
} else {
char thread_val[10];
sprintf_s(thread_val, 10, "%d", params().video_threads());
av_dict_set(&codec_opts, "threads", thread_val, 0);
QString thread_val = QString::number(params().video_threads());
av_dict_set(&codec_opts, "threads", thread_val.toUtf8(), 0);
}
// Try to open encoder