Skip to content

Commit 98e298c

Browse files
committed
vdec/lavc: fix H.265 decode with intra-refresh
Fix decoding of HEVC streams with intra-refresh and current Git FFmpeg code. When intra-refresh is enabled and we are not catching the first frame, no frame will be decoded without the flag AV_CODEC_FLAG_OUTPUT_CORRUPT. This corresponds with FFmpeg commit bc1a3bfd (2025-02-20), not yet included in current 7.1.1 / lavc 61, should appear in lavc 62. Steps to reproduce: ``` uv -t testcard -c lavc:e=libx265 -d gl ```
1 parent 3b39a30 commit 98e298c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/video_decompress/libavcodec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ static void set_codec_context_params(struct state_libavcodec_decompress *s)
189189
}
190190
log_msg(LOG_LEVEL_INFO, MOD_NAME "Setting thread count to %d, type: %s\n", s->codec_ctx->thread_count, lavc_thread_type_to_str(s->codec_ctx->thread_type));
191191

192+
s->codec_ctx->flags |= AV_CODEC_FLAG_OUTPUT_CORRUPT;
192193
s->codec_ctx->flags |= req_low_delay ? AV_CODEC_FLAG_LOW_DELAY : 0;
193194
s->codec_ctx->flags2 |= AV_CODEC_FLAG2_FAST;
194195
// set by decoder

0 commit comments

Comments
 (0)