[FFmpeg-cvslog] lavf: don't select an attached picture as default stream for seeking.

Anton Khirnov git at videolan.org
Fri Mar 16 01:48:31 CET 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Mar 15 09:04:41 2012 +0100| [cd9a3c351264885b5940b0a46616d26185356614] | committer: Anton Khirnov

lavf: don't select an attached picture as default stream for seeking.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd9a3c351264885b5940b0a46616d26185356614
---

 libavformat/utils.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index f5cb5d4..863997d 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)



More information about the ffmpeg-cvslog mailing list