Skip to content

Commit

Permalink
[fbsync] Fix build with ffmpeg 6.0 (pytorch#8096)
Browse files Browse the repository at this point in the history
Summary: Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>

Reviewed By: vmoens

Differential Revision: D55062796

fbshipit-source-id: ebd3bd552ee55f1bc2788df64ed21ed4fefab09e

Co-authored-by: Nicolas Hug <nh.nicolas.hug@gmail.com>
(cherry picked from commit 152bad7)
  • Loading branch information
NicolasHug authored and Miriup committed Dec 9, 2024
1 parent b33b320 commit 2d7716e
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions torchvision/csrc/cpu/decoder/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,8 @@ int Stream::openCodec(std::vector<DecoderMetadata>* 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
Expand Down

0 comments on commit 2d7716e

Please sign in to comment.