avformat/mov: only force parsing for video tracks if stss is empty
authorHendrik Leppkes <h.leppkes@gmail.com>
Mon, 4 Nov 2013 15:22:27 +0000 (16:22 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Mon, 24 Mar 2014 22:38:10 +0000 (23:38 +0100)
Fixes playback of some AAC streams, which are otherwise mangled by the
parser, and stss is typically only valid for video anyway.

Fixes a regression since e41ea866.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 019247bdc326a90bf20d3ce5d2413cc642e8bb08)

libavformat/mov.c

index 0f0c411..4f12f0f 100644 (file)
@@ -1684,7 +1684,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;
     }