aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorJoakim Plate <elupus@ecce.se>2011-09-11 00:33:20 +0200
committerMartin Storsjö <martin@martin.st>2012-04-06 20:51:18 +0300
commitba24f129824d21aa0f7312e90d0cf5b7fd9cf043 (patch)
treebf1966efe28facefc7436beb1c4f5d676e863e4c /libavformat
parent951e715cebfaffced7f13c1525771ff917fe1d38 (diff)
downloadffmpeg-ba24f129824d21aa0f7312e90d0cf5b7fd9cf043.tar.gz
libavformat: Only require first packet to be known for audio/video streams
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: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f38045c5dd..6ebfabb721 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2306,7 +2306,9 @@ 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) {