PR #22668 opened by deadbeef84
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22668
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22668.patch

Not all I-frames can be used for random-access, we should also
respect bit 7 of the index table entry flags which indicates random
access.

Refs: https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/22467


>From c144fc9da34923fc5235fba77bb8ad450b172a86 Mon Sep 17 00:00:00 2001
From: Jesper Ek <[email protected]>
Date: Tue, 31 Mar 2026 15:52:27 +0200
Subject: [PATCH] avformat/mxfdec: require keyframes to have random-access bit
 set

Not all I-frames can be used for random-access, we should also
respect bit 7 of the index table entry flags which indicates random
access.

Refs: https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/22467
---
 libavformat/mxfdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 59b9b43a22..2d0849637e 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2101,7 +2101,7 @@ static int mxf_compute_ptses_fake_index(MXFContext *mxf, 
MXFIndexTable *index_ta
                 break;
             }
 
-            flags[x] = !(s->flag_entries[j] & 0x30) ? AVINDEX_KEYFRAME : 0;
+            flags[x] = !(s->flag_entries[j] & 0x30) && (s->flag_entries[j] & 
0x80) ? AVINDEX_KEYFRAME : 0;
 
             if (index < 0 || index >= index_table->nb_ptses) {
                 av_log(mxf->fc, AV_LOG_ERROR,
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to