[FFmpeg-devel] [PATCH v2 6/8] avformat/mov: parse ISO-14496-12 ChannelLayout

Tomas Härdin git at haerdin.se
Mon Feb 27 15:36:52 EET 2023


lör 2023-02-25 klockan 02:28 +0800 skrev Zhao Zhili:
> 
> +        if (!layout) {
> +            uint8_t *positions = av_malloc(st->codecpar-
> >ch_layout.nb_channels);

Could be allocated on the stack, either using a fixed-size array, a VLA
or alloca(), thus avoiding a heap allocation

/Tomas



More information about the ffmpeg-devel mailing list