Commit c2c4cee8 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/matroskaenc: Check alpha_mode

Fixes CID1231992
Suggested-by: 's avatarTimothy Gu <timothygu99@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent cc0acdbd
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment