aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-20 18:40:20 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-24 20:33:17 +0200
commitc2c4cee866926cb95b2b1a4b28fff9caa4177c7e (patch)
treee396513eef303dbc6cd1ce26ac898bd038a022ea
parentcc0acdbd684144776f8f000c0733eb4884cb0880 (diff)
downloadffmpeg-c2c4cee866926cb95b2b1a4b28fff9caa4177c7e.tar.gz
avformat/matroskaenc: Check alpha_mode
Fixes CID1231992 Suggested-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/matroskaenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 7123ec6c96..98fe4af291 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -874,8 +874,8 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
}
}
- if ((tag = av_dict_get(st->metadata, "alpha_mode", NULL, 0)) ||
- (tag = av_dict_get( s->metadata, "alpha_mode", NULL, 0)) ||
+ if (((tag = av_dict_get(st->metadata, "alpha_mode", NULL, 0)) && atoi(tag->value)) ||
+ ((tag = av_dict_get( s->metadata, "alpha_mode", NULL, 0)) && atoi(tag->value)) ||
(codec->pix_fmt == AV_PIX_FMT_YUVA420P)) {
put_ebml_uint(pb, MATROSKA_ID_VIDEOALPHAMODE, 1);
}