Skip to content

Commit 919783f

Browse files
zboszorNicolasHug
authored andcommitted
Fix build with ffmpeg 6.0 (pytorch#8096)
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> Co-authored-by: Nicolas Hug <nh.nicolas.hug@gmail.com>
1 parent 71dba93 commit 919783f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

torchvision/csrc/io/decoder/stream.cpp

+2-9
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,8 @@ int Stream::openCodec(std::vector<DecoderMetadata>* metadata, int num_threads) {
6363
codecCtx_->thread_count = num_threads;
6464
} else {
6565
// otherwise set sensible defaults
66-
// with the special case for the different MPEG4 codecs
67-
// that don't have threading context functions
68-
if (codecCtx_->codec->capabilities & AV_CODEC_CAP_INTRA_ONLY) {
69-
codecCtx_->thread_type = FF_THREAD_FRAME;
70-
codecCtx_->thread_count = 2;
71-
} else {
72-
codecCtx_->thread_count = 8;
73-
codecCtx_->thread_type = FF_THREAD_SLICE;
74-
}
66+
codecCtx_->thread_count = 8;
67+
codecCtx_->thread_type = FF_THREAD_SLICE;
7568
}
7669

7770
int ret;

0 commit comments

Comments
 (0)