OSDN Git Service

libavformat/utils: Only require first packet to be known for all audio and video...
authorJoakim Plate <elupus@ecce.se>
Sat, 10 Sep 2011 22:33:20 +0000 (00:33 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 10 Sep 2011 22:33:20 +0000 (00:33 +0200)
It can take a long time before subtitles or data streams show up,
so we shouldn't wait for those before assuming we have all info
for streams.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index d08faea..dbe1a63 100644 (file)
@@ -2359,7 +2359,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
                 break;
             if(st->parser && st->parser->parser->split && !st->codec->extradata)
                 break;
-            if(st->first_dts == AV_NOPTS_VALUE)
+            if(st->first_dts == AV_NOPTS_VALUE && (st->codec->codec_type == AVMEDIA_TYPE_VIDEO || st->codec->codec_type == AVMEDIA_TYPE_AUDIO))
                 break;
         }
         if (i == ic->nb_streams) {