X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fframework%2Fmlt_profile.c;h=3baab0efc3345689d6fd845c8eed86a15779e8fd;hb=41765733f12375a01994036780ec9b723737b41d;hp=09c3258656a6762a6a9c12e0be58e43448e424c7;hpb=216d29325685278d31ba66d4a49fe5dbc2c98b60;p=mlt diff --git a/src/framework/mlt_profile.c b/src/framework/mlt_profile.c index 09c32586..3baab0ef 100644 --- a/src/framework/mlt_profile.c +++ b/src/framework/mlt_profile.c @@ -311,3 +311,26 @@ void mlt_profile_close( mlt_profile profile ) profile = NULL; } } + +/** Make a copy of a profile. + * + * \public \memberof mlt_profile_s + * \param profile the profile to clone + * \return a copy of the profile + */ + +mlt_profile mlt_profile_clone( mlt_profile profile ) +{ + mlt_profile clone = NULL; + + if ( profile ) + { + clone = calloc( 1, sizeof( *profile ) ); + if ( clone ) + { + memcpy( clone, profile, sizeof( *profile ) ); + clone->description = strdup( profile->description ); + } + } + return clone; +}