ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Wed Aug 20 18:40:20 2014 +0200| [c2c4cee866926cb95b2b1a4b28fff9caa4177c7e] | committer: Michael Niedermayer
avformat/matroskaenc: Check alpha_mode Fixes CID1231992 Suggested-by: Timothy Gu <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c2c4cee866926cb95b2b1a4b28fff9caa4177c7e --- libavformat/matroskaenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 7123ec6..98fe4af 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); } _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
