summaryrefslogtreecommitdiff
path: root/src/codec/ffmpeg
diff options
context:
space:
mode:
Diffstat (limited to 'src/codec/ffmpeg')
-rw-r--r--src/codec/ffmpeg/decoder.c6
-rw-r--r--src/codec/ffmpeg/demuxer.c1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/codec/ffmpeg/decoder.c b/src/codec/ffmpeg/decoder.c
index 80b1d12..7401698 100644
--- a/src/codec/ffmpeg/decoder.c
+++ b/src/codec/ffmpeg/decoder.c
@@ -260,9 +260,9 @@ static bool ff_decoder_init(struct camu_decoder *dec, struct camu_renderer *rend
}
if (cpus > 0) {
av->codec_context->thread_count = cpus;
- // FF_THREAD_FRAME or FF_THREAD_SLICE.
- // SLICE seems to work better based on videos that got completely choked
- // in THREAD_FRAME mode (4k60 HEVC, FFmpeg 7.1.1, AMD 3900x).
+ // FF_THREAD_FRAME, FF_THREAD_SLICE or both.
+ // Slice seems to work better based on videos that get completely choked
+ // in frame-only or both (4k60 HEVC, FFmpeg 7.1.1, AMD 3900x).
av->codec_context->thread_type = FF_THREAD_SLICE;
log_info("Using %i threads for decoder.", cpus);
}
diff --git a/src/codec/ffmpeg/demuxer.c b/src/codec/ffmpeg/demuxer.c
index c5ca20c..4cf52dd 100644
--- a/src/codec/ffmpeg/demuxer.c
+++ b/src/codec/ffmpeg/demuxer.c
@@ -41,6 +41,7 @@ static bool ff_demuxer_init(struct camu_demuxer *demux, struct cch_handle *handl
// AVIO_SEEKABLE_NORMAL should always be unset if we know we cannot seek.
// However, it should also never be unset if we *do* want to seek because it
// disables long seeks (Not tested in a long time).
+ // This will also make some resources (e.g. .opus) fail to determine a duration.
av->io_context->seekable &= ~AVIO_SEEKABLE_NORMAL;
} else {
av->io_context->seekable |= AVIO_SEEKABLE_NORMAL;