[FFmpeg-devel] [PATCH 2/2] pngdec: expose gAMA and cHRM chunks as AVMasteringDisplayMetadata

wm4 nfxjfg at googlemail.com
Wed Sep 20 21:32:59 EEST 2017


On Wed, 20 Sep 2017 15:22:42 -0300
James Almer <jamrial at gmail.com> wrote:

> On 9/20/2017 3:18 PM, wm4 wrote:
> > On Wed, 20 Sep 2017 04:00:28 +0100
> > Rostislav Pehlivanov <atomnuker at gmail.com> wrote:
> >   
> >> +    if (mdm.has_gamma || mdm.has_primaries) {
> >> +        AVMasteringDisplayMetadata *new_mdm = av_mastering_display_metadata_create_side_data(p);
> >> +        memcpy(new_mdm, &mdm, sizeof(AVMasteringDisplayMetadata));
> >> +    }
> >> +  
> > 
> > Use assignment instead of memcpy, duh.  
> 
> He shouldn't be using AVMasteringDisplayMetadata on stack to begin with,
> so no.
> 
> It's bad enough sizeof() has to be used at all already.

Again you're just creating new problems out of thin air. We don't
realistically support mismatched libs, even if in theory we do. I wish
we could stop wasting time on things that don't matter at all.


More information about the ffmpeg-devel mailing list