[FFmpeg-devel] Memory leaks using x265 encoder
george at nsup.org
Wed Jan 2 17:05:51 EET 2019
Oliver Collyer (2019-01-02):
> diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
Please use git format-patch to prepare your patches. Also please try to
convince your MUA to use text/plain for patches.
> +static int open_enc_count = 0;
> +static pthread_mutex_t open_enc_count_lock = PTHREAD_MUTEX_INITIALIZER;
Static variables are unacceptable. And indeed, these are wrong: you are
counting several instances, possibly of different APIs, but with a
The way I read things, the leak you are trying to fix does not exist: it
is global state, kept until the end but not lost.
More information about the ffmpeg-devel