[vlc-devel] [PATCH 03/25] image: use es_format_Copy() instead of es_format_Init() where possible

Rémi Denis-Courmont remi at remlab.net
Tue Jul 11 15:33:43 CEST 2017


On mardi 11 juillet 2017 08:52:31 EEST Steve Lhomme wrote:
> I think that's what we should do. Given es_format_Copy() is a VLC_API
> I don't know if we can remove/rename it.

Hint: Assigning an unitialized object with the the value of an initialized 
object of the same type is "copy". Alllocating a new object and then copying 
an object of the same type into it is "duplicate".

The function name and semantics are absolutely fine as they are. Forcing a 
dummy initialization first is ridiculous.

-- 
Rémi



More information about the vlc-devel mailing list