#if defined(__GLIBC__) || defined(__DARWIN__)
if ( locale )
result = strtod_l( value, &end, locale );
+ else
#endif
- else
result = strtod( value, &end );
if ( end && end[0] == '%' )
result /= 100.0;
self->destructor = free;
self->serialiser = that->serialiser;
}
- else if ( self->types & mlt_prop_data && self->serialiser != NULL )
+ else if ( self->types & mlt_prop_data && that->serialiser != NULL )
{
self->types = mlt_prop_string;
- self->prop_string = self->serialiser( self->data, self->length );
+ self->prop_string = that->serialiser( that->data, that->length );
}
pthread_mutex_unlock( &self->mutex );
}
else
{
mlt_animation_set_length( self->animation, length );
+ pthread_mutex_lock( &self->mutex );
self->types |= mlt_prop_data;
self->data = self->animation;
self->serialiser = (mlt_serialiser) mlt_animation_serialize;
+ pthread_mutex_unlock( &self->mutex );
}
}
else if ( self->prop_string )
double mlt_property_anim_get_double( mlt_property self, double fps, locale_t locale, int position, int length )
{
+ pthread_mutex_lock( &self->mutex );
double result;
if ( self->animation || ( ( self->types & mlt_prop_string ) && self->prop_string ) )
{
{
result = mlt_property_get_double( self, fps, locale );
}
+ pthread_mutex_unlock( &self->mutex );
return result;
}
int mlt_property_anim_get_int( mlt_property self, double fps, locale_t locale, int position, int length )
{
+ pthread_mutex_lock( &self->mutex );
int result;
if ( self->animation || ( ( self->types & mlt_prop_string ) && self->prop_string ) )
{
{
result = mlt_property_get_int( self, fps, locale );
}
+ pthread_mutex_unlock( &self->mutex );
return result;
}
char* mlt_property_anim_get_string( mlt_property self, double fps, locale_t locale, int position, int length )
{
+ pthread_mutex_lock( &self->mutex );
char *result;
if ( self->animation || ( ( self->types & mlt_prop_string ) && self->prop_string ) )
{
refresh_animation( self, fps, locale, length );
mlt_animation_get_item( self->animation, &item, position );
- pthread_mutex_lock( &self->mutex );
if ( self->prop_string )
free( self->prop_string );
self->prop_string = mlt_property_get_string_l( item.property, locale );
if ( self->prop_string )
self->prop_string = strdup( self->prop_string );
self->types |= mlt_prop_string;
- pthread_mutex_unlock( &self->mutex );
result = self->prop_string;
mlt_property_close( item.property );
{
result = mlt_property_get_string_l( self, locale );
}
+ pthread_mutex_unlock( &self->mutex );
return result;
}
#if defined(__GLIBC__) || defined(__DARWIN__)
if ( locale )
temp = strtod_l( value, &p, locale );
+ else
#endif
- else
temp = strtod( value, &p );
if ( p != value )
{
mlt_rect mlt_property_anim_get_rect( mlt_property self, double fps, locale_t locale, int position, int length )
{
+ pthread_mutex_lock( &self->mutex );
mlt_rect result;
if ( self->animation || ( ( self->types & mlt_prop_string ) && self->prop_string ) )
{
{
result = mlt_property_get_rect( self, locale );
}
+ pthread_mutex_unlock( &self->mutex );
return result;
}