[x264-devel] Memory management

Dieter Verslype dieter.verslype at intec.ugent.be
Tue May 22 16:40:21 CEST 2012


Hello developer-list,

I have an application that frequently sets up and tears down x264
encoders, and think there is an unclarity in the memory management of the
encoder. I posted this same question to the doom10 forum, where they
redirected me to this mailing list
(http://doom10.org/index.php?topic=2258.0).

My question is the following:

what happens with the nal units after cleaning up the encoder. I think now
the nals of the previous frame are erased on every x264_encoder_encode
call, but what happens with the last nals. Are they cleaned on a
x264_encoder_close.

And what about pic_out. At first I alloc'ed it with x264_picture_alloc,
but my app crashed on x264_picture_clean before closing the encoder. Now I
don't even alloc it myself (and in fact I do not know why it is used).

I don't know what happens exactly, but my application's memory augments
linearly with the number of encoders started and stopped.

I use version x264-snapshot-20120213-2245 of the x264 library.

regards,

dvrslype






More information about the x264-devel mailing list