[FFmpeg-cvslog] lavf/segment: do not auto-select a video stream with attached_pic disposition

Stefano Sabatini git at videolan.org
Sat Jan 19 00:39:01 CET 2013


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Wed Jan 16 20:10:12 2013 +0100| [d00df260ca3341e5cacdd53fb08c42b05fb1d442] | committer: Stefano Sabatini

lavf/segment: do not auto-select a video stream with attached_pic disposition

In particular, fix trac ticket #2138.

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

 libavformat/segment.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/segment.c b/libavformat/segment.c
index d7f9cc3..bf8c70c 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -475,7 +475,9 @@ static int select_reference_stream(AVFormatContext *s)
         /* select first index for each type */
         for (i = 0; i < s->nb_streams; i++) {
             type = s->streams[i]->codec->codec_type;
-            if ((unsigned)type < AVMEDIA_TYPE_NB && type_index_map[type] == -1)
+            if ((unsigned)type < AVMEDIA_TYPE_NB && type_index_map[type] == -1
+                /* ignore attached pictures/cover art streams */
+                && !(s->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC))
                 type_index_map[type] = i;
         }
 



More information about the ffmpeg-cvslog mailing list