aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg_opt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-04 19:00:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-10 17:23:18 +0200
commit22d804b7f0da5e3cb72860a8e337007abbb9e276 (patch)
tree2c33f9632638dbc6f17178b08ff27514a5dc20a8 /ffmpeg_opt.c
parentf9f11c10005ec070faf2af5af945bb52fda04819 (diff)
downloadffmpeg-22d804b7f0da5e3cb72860a8e337007abbb9e276.tar.gz
ffmpeg: dont auto match videostreams with attachment pics.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r--ffmpeg_opt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 6dfac056e5..99670bb5ad 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;
}