lavf: don't select an attached picture as default stream for seeking.
authorAnton Khirnov <anton@khirnov.net>
Thu, 15 Mar 2012 08:04:41 +0000 (09:04 +0100)
committerAnton Khirnov <anton@khirnov.net>
Thu, 15 Mar 2012 13:01:05 +0000 (14:01 +0100)
libavformat/utils.c

index f5cb5d4..863997d 100644 (file)
@@ -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)