From e17a24021f9a6cc84e9764cc804029e39fabb8fd Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Tue, 11 Oct 2022 00:27:27 -0700 Subject: [PATCH] ffmpegdecoder: disable interlaced scaling So for some reason enabling interlaced scaling causes memory corruption. Is it an FFmpeg bug or ours? I have no idea. But it only happens if interlaced scaling is enabled. If it isn't, either by forcing it off or deinterlacing it beforehand, it doesn't happen. Since scaling is only done for low quality preview, I opted to just disable it, but maybe I'll decide against it later. --- app/codec/ffmpeg/ffmpegdecoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/codec/ffmpeg/ffmpegdecoder.cpp b/app/codec/ffmpeg/ffmpegdecoder.cpp index d398108a2..069d9d342 100644 --- a/app/codec/ffmpeg/ffmpegdecoder.cpp +++ b/app/codec/ffmpeg/ffmpegdecoder.cpp @@ -1034,7 +1034,7 @@ bool FFmpegDecoder::InitScaler(AVFrame *input, const RetrieveVideoParams& params dst_width = VideoParams::GetScaledDimension(src_width, filter_params_.divider); dst_height = VideoParams::GetScaledDimension(src_height, filter_params_.divider); - snprintf(filter_args, kFilterArgSz, "w=%d:h=%d:flags=fast_bilinear:interl=-1", + snprintf(filter_args, kFilterArgSz, "w=%d:h=%d:flags=fast_bilinear:interl=0", dst_width, dst_height);