avformat/matroskaenc: Check alpha_mode

Fixes CID1231992

Suggested-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-08-20 18:40:20 +02:00
parent cc0acdbd68
commit c2c4cee866
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}