[FFmpeg-devel] [PATCH 09/13] lavc/jpeg2000: Speed up ff_jpeg2000_tag_tree_init() using stereotypes for sizes <= 4x4
Tomas Härdin
tjoppen at acc.umu.se
Tue Jun 21 10:57:38 EEST 2022
lör 2022-06-18 klockan 17:00 +0200 skrev Anton Khirnov:
> Quoting Tomas Härdin (2022-06-14 16:43:38)
> >
> > + if (w <= 4 && h <= 4) {
> > + int idx = w-1 + (h-1)*4;
> > + size_t sz = tt_sizes[idx];
> > + av_fast_malloc(old, size, sz);
>
> Unchecked mallocs are of the beast.
Right, it should return AVERROR(ENOMEM) if !*old. Will be fixed in the
updated patchset
/Tomas
More information about the ffmpeg-devel
mailing list