[FFmpeg-cvslog] avformat/matroskaenc: Check alpha_mode

Michael Niedermayer michaelni at gmx.at
Mon Aug 25 19:55:46 CEST 2014


On Mon, Aug 25, 2014 at 06:35:11AM +0200, Reimar Döffinger wrote:
> On 24.08.2014, at 20:39, git at videolan.org (Michael Niedermayer) wrote:
> > -        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)) ||
> 
> Not sure it matters, but wouldn't value == NULL have worked before but would crash now?

iam not sure i understand
tag->value should never be NULL
av_dict_set with a NULL value would delete the entry

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20140825/4398cfac/attachment.asc>


More information about the ffmpeg-cvslog mailing list