From cd9a3c351264885b5940b0a46616d26185356614 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 15 Mar 2012 09:04:41 +0100 Subject: [PATCH] lavf: don't select an attached picture as default stream for seeking. --- libavformat/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index f5cb5d4a77..863997d0a1 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1307,7 +1307,8 @@ int av_find_default_stream_index(AVFormatContext *s) return -1; for(i = 0; i < s->nb_streams; i++) { st = s->streams[i]; - if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { + if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && + !(st->disposition & AV_DISPOSITION_ATTACHED_PIC)) { return i; } if (first_audio_index < 0 && st->codec->codec_type == AVMEDIA_TYPE_AUDIO)