[FFmpeg-devel] [PATCH 2/3] ffmpeg: dont auto match videostreams with attachment pics.
Michael Niedermayer
michaelni at gmx.at
Sat Aug 4 19:17:37 CEST 2012
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
ffmpeg.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ffmpeg.c b/ffmpeg.c
index cc1b32f..9c653dc 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -5230,10 +5230,13 @@ static void opt_output_file(void *optctx, const char *filename)
/* video: highest resolution */
if (!o->video_disable && oc->oformat->video_codec != 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;
}
--
1.7.9.5
More information about the ffmpeg-devel
mailing list