From 2d7716ebca22c3f5669be75aa51bfbbd91042fff Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Tue, 19 Mar 2024 09:54:12 -0700 Subject: [PATCH] [fbsync] Fix build with ffmpeg 6.0 (#8096) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Signed-off-by: Zoltán Böszörményi Reviewed By: vmoens Differential Revision: D55062796 fbshipit-source-id: ebd3bd552ee55f1bc2788df64ed21ed4fefab09e Co-authored-by: Nicolas Hug (cherry picked from commit 152bad79abc4eec159ae9a51ca7f844ee1ad24a5) --- torchvision/csrc/cpu/decoder/stream.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/torchvision/csrc/cpu/decoder/stream.cpp b/torchvision/csrc/cpu/decoder/stream.cpp index 4f672697a25..d9465ceeb16 100644 --- a/torchvision/csrc/cpu/decoder/stream.cpp +++ b/torchvision/csrc/cpu/decoder/stream.cpp @@ -62,15 +62,8 @@ int Stream::openCodec(std::vector* metadata, int num_threads) { codecCtx_->thread_count = num_threads; } else { // otherwise set sensible defaults - // with the special case for the different MPEG4 codecs - // that don't have threading context functions - if (codecCtx_->codec->capabilities & AV_CODEC_CAP_INTRA_ONLY) { - codecCtx_->thread_type = FF_THREAD_FRAME; - codecCtx_->thread_count = 2; - } else { - codecCtx_->thread_count = 8; - codecCtx_->thread_type = FF_THREAD_SLICE; - } + codecCtx_->thread_count = 8; + codecCtx_->thread_type = FF_THREAD_SLICE; } // print codec type and number of threads