[FFmpeg-devel] [PATCH] avformat/mov: only force parsing for video tracks if stss is empty

Hendrik Leppkes h.leppkes at gmail.com
Mon Nov 4 16:22:27 CET 2013


Fixes playback of some AAC streams, which are otherwise mangled by the
parser, and stss is typically only valid for video anyway.
---
 libavformat/mov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 3d20d33..ad8a668 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1779,7 +1779,7 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     if (!entries)
     {
         sc->keyframe_absent = 1;
-        if (!st->need_parsing)
+        if (!st->need_parsing && st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
             st->need_parsing = AVSTREAM_PARSE_HEADERS;
         return 0;
     }
-- 
1.8.4.msysgit.0



More information about the ffmpeg-devel mailing list