[FFmpeg-devel] [PATCH 20/35] avdevice/avdevice: clean up avdevice_capabilities_create

Diederick C. Niehorster dcnieho at gmail.com
Tue Jun 8 23:33:10 EEST 2021


On Tue, Jun 8, 2021 at 2:09 PM Nicolas George <george at nsup.org> wrote:
>
> Diederick Niehorster (12021-06-08):
> > -    *caps = av_mallocz(sizeof(**caps));
> > +    *caps = av_mallocz(sizeof(AVDeviceCapabilitiesQuery));
>
> var = malloc(sizeof(*var)) is preferred over var = malloc(type), because
> if you change the type of var, it happens in another part of the code
> and you would have to remember to change it here too.

Reverted.

Thanks,
Dee


More information about the ffmpeg-devel mailing list