[vlc-devel] [PATCH 1/2] Add a file extension dynamic manager to libvlc.
Rémi Denis-Courmont
rem at videolan.org
Sun Mar 1 15:30:34 CET 2009
Hello,
Le jeudi 26 février 2009 11:23:14 Benjamin Gerard, vous avez écrit :
> +/* MUST BE LOCKED -- duplicate a pool */
> +static fileext_pool_t * pool_dup( fileext_pool_t * pool )
> +{
> + fileext_pool_t * dup = pool_create( pool->i_cnt );
> +
> + if( dup )
> + {
> + dup->i_cnt = pool->i_cnt;
> + memmove( dup->fileext, pool->fileext, dup->i_cnt * sizeof(fileext_t)
> );
> + }
> + return dup;
memmove() works, but memcpy() is faster and more idiomatic here.
But anyway... mutexes cannot be copied, so this seems incorrect, but I do not
know why you have the duplication function.
--
Rémi Denis-Courmont
http://git.remlab.net/cgi-bin/gitweb.cgi?p=vlc-courmisch.git;a=summary
More information about the vlc-devel
mailing list