[FFmpeg-cvslog] avformat/mov: don't unconditionally set all audio packets in fragments as key frames

James Almer git at videolan.org
Sun Dec 1 18:47:42 EET 2024


ffmpeg | branch: release/7.1 | James Almer <jamrial at gmail.com> | Sat Nov 16 17:54:34 2024 -0300| [dc9d9b8636f1e71fb839aa25955122b608f6d98f] | committer: James Almer

avformat/mov: don't unconditionally set all audio packets in fragments as key frames

Some audio codecs, like TrueHD, have non key frames.

Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit 8ddbc26dedcf83962dd3aed90a6bb0a95847d386)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc9d9b8636f1e71fb839aa25955122b608f6d98f
---

 libavformat/mov.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 54f8594f67..9a9a2414e7 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5843,10 +5843,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
             pts = AV_NOPTS_VALUE;
         }
 
-        if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO)
-            keyframe = 1;
-        else
-            keyframe =
+        keyframe =
                 !(sample_flags & (MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC |
                                   MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES));
         if (keyframe) {



More information about the ffmpeg-cvslog mailing list