[FFmpeg-cvslog] ffmpeg: dont auto match videostreams with attachment pics.

Michael Niedermayer git at videolan.org
Fri Aug 10 17:29:35 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Aug  4 19:00:11 2012 +0200| [22d804b7f0da5e3cb72860a8e337007abbb9e276] | committer: Michael Niedermayer

ffmpeg: dont auto match videostreams with attachment pics.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 ffmpeg_opt.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 6dfac05..99670bb 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1449,10 +1449,13 @@ void opt_output_file(void *optctx, const char *filename)
         /* video: highest resolution */
         if (!o->video_disable && oc->oformat->video_codec != AV_CODEC_ID_NONE) {
             int area = 0, idx = -1;
+            int qcr = avformat_query_codec(oc->oformat, oc->oformat->video_codec, 0);
             for (i = 0; i < nb_input_streams; i++) {
                 ist = input_streams[i];
                 if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
                     ist->st->codec->width * ist->st->codec->height > area) {
+                    if((qcr==MKTAG('A', 'P', 'I', 'C')) && !(ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC))
+                        continue;
                     area = ist->st->codec->width * ist->st->codec->height;
                     idx = i;
                 }



More information about the ffmpeg-cvslog mailing list