[vlc-devel] Re: Patch to add multi-pass encoding support for H.264

Sašo Kiselkov skiselkov at gmail.com
Thu Feb 8 22:39:32 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Rémi Denis-Courmont wrote:
> Le jeudi 8 février 2007 23:24, Sašo Kiselkov a écrit :
>> I'm submitting a patch which adds multi-pass encoding to VLC's H.264
>> codec module. I'm not sure about the memory management in it, so it
>> might need some revision. I've been seriously missing multi-pass
>> encoding in VLC, as it dramatically improves quality and lowers
>> bitrate consumption.
>>
>> Anybody interrested in including it in the mainline VLC distribution?
> 
> I think you have to free(val.psz_string); for each var_Get(). You could 
> also use strdup() instead of malloc()+strcpy(), and in either case you 
> probably need to free() the parameters string from the Close() 
> function.
> 

So, as I understand it, var_Get always allocates new memory, so
theoretically would be sufficient to do a simple assignment of the
pointer value, instead of doing a strdup and free of the original right
afterwards, right? Oh and I will add a free into Close().

- --
Saso
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFy5iUakxhuWWzY78RA1r4AKCRtMit2sUa8EG/vUGa+OWOVlx2VQCeNL7l
zkGANwWjVQgNyjBIwkdda8M=
=xrpL
-----END PGP SIGNATURE-----

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list