aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-03-15 09:04:41 +0100
committerAnton Khirnov <anton@khirnov.net>2012-03-15 14:01:05 +0100
commitcd9a3c351264885b5940b0a46616d26185356614 (patch)
tree92fd9752c33edb244605526470b5d2c6c462e029
parent251422982b885f9d41f0c743887a9ff05bf74cb7 (diff)
downloadffmpeg-cd9a3c351264885b5940b0a46616d26185356614.tar.gz
lavf: don't select an attached picture as default stream for seeking.
-rw-r--r--libavformat/utils.c3
1 files changed, 2 insertions, 1 deletions
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)