[MPlayer-cvslog] r25644 - trunk/libass/ass_library.c
eugeni
subversion at mplayerhq.hu
Mon Jan 7 22:06:50 CET 2008
Author: eugeni
Date: Mon Jan 7 22:06:50 2008
New Revision: 25644
Log:
No need to reinvent strdup...
Modified:
trunk/libass/ass_library.c
Modified: trunk/libass/ass_library.c
==============================================================================
--- trunk/libass/ass_library.c (original)
+++ trunk/libass/ass_library.c Mon Jan 7 22:06:50 2008
@@ -90,8 +90,7 @@ void ass_add_font(ass_library_t* priv, c
return;
grow_array((void**)&priv->fontdata, priv->num_fontdata, sizeof(*priv->fontdata));
- priv->fontdata[idx].name = malloc(strlen(name));
- strcpy(priv->fontdata[idx].name, name);
+ priv->fontdata[idx].name = strdup(name);
priv->fontdata[idx].data = malloc(size);
memcpy(priv->fontdata[idx].data, data, size);
More information about the MPlayer-cvslog
mailing list