[FFmpeg-devel] [PATCH v7 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper.
Moritz Barsnick
barsnick at gmx.net
Mon Mar 11 10:49:20 EET 2019
On Mon, Mar 11, 2019 at 04:17:21 +0000, Sun, Jing A wrote:
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of Carl Eugen Hoyos
> > The condition is unnecessary.
> [SUN, Jing] If av_mallocz fails, free_buffer will be called with in_data being NULL. Checking it avoids unnecessary calling to av_freep in that case.
Please read the kind documentation (and the "Note" quzoted below) or
the source of said function, and how other uses within ffmpeg are:
https://www.ffmpeg.org/doxygen/4.1/group__lavu__mem__funcs.html#ga0cc84043ea2167ad005c86e11d0bcdba
void av_freep (void *ptr)
[...]
Note
*ptr = NULL is safe and leads to no action.
In other words, av_freep() already has this check.
Moritz
More information about the ffmpeg-devel
mailing list