@@ -120,7 +120,7 @@ mlt_property mlt_property_init()
120120static void clear_property (mlt_property self )
121121{
122122 // Special case data handling
123- if (self -> types & mlt_prop_data && self -> destructor != NULL )
123+ if (self -> data && self -> destructor )
124124 self -> destructor (self -> data );
125125
126126 // Special case string handling
@@ -753,6 +753,9 @@ char *mlt_property_get_string_tf(mlt_property self, mlt_time_format time_format)
753753 } else if (self -> types & mlt_prop_data && self -> data && self -> serialiser ) {
754754 self -> types |= mlt_prop_string ;
755755 self -> prop_string = self -> serialiser (self -> data , self -> length );
756+ } else if (self -> types & mlt_prop_rect && self -> data && self -> serialiser ) {
757+ self -> types |= mlt_prop_string ;
758+ self -> prop_string = self -> serialiser (self -> data , self -> length );
756759 }
757760 }
758761 pthread_mutex_unlock (& self -> mutex );
@@ -852,6 +855,9 @@ char *mlt_property_get_string_l_tf(mlt_property self,
852855 } else if (self -> types & mlt_prop_data && self -> data && self -> serialiser ) {
853856 self -> types |= mlt_prop_string ;
854857 self -> prop_string = self -> serialiser (self -> data , self -> length );
858+ } else if (self -> types & mlt_prop_rect && self -> data && self -> serialiser ) {
859+ self -> types |= mlt_prop_string ;
860+ self -> prop_string = self -> serialiser (self -> data , self -> length );
855861 }
856862#if !defined(_WIN32 )
857863 // Restore the current locale
@@ -904,7 +910,9 @@ void *mlt_property_get_data(mlt_property self, int *length)
904910
905911 // Return the data (note: there is no conversion here)
906912 pthread_mutex_lock (& self -> mutex );
907- void * result = self -> data ;
913+ void * result = NULL ;
914+ if (self -> types & mlt_prop_data )
915+ result = self -> data ;
908916 pthread_mutex_unlock (& self -> mutex );
909917 return result ;
910918}
@@ -951,7 +959,7 @@ void mlt_property_pass(mlt_property self, mlt_property that)
951959 self -> prop_string = strdup (that -> prop_string );
952960 } else if (that -> types & mlt_prop_rect ) {
953961 clear_property (self );
954- self -> types = mlt_prop_rect | mlt_prop_data ;
962+ self -> types = mlt_prop_rect ;
955963 self -> length = that -> length ;
956964 self -> data = calloc (1 , self -> length );
957965 memcpy (self -> data , that -> data , self -> length );
@@ -1889,7 +1897,7 @@ int mlt_property_set_rect(mlt_property self, mlt_rect value)
18891897{
18901898 pthread_mutex_lock (& self -> mutex );
18911899 clear_property (self );
1892- self -> types = mlt_prop_rect | mlt_prop_data ;
1900+ self -> types = mlt_prop_rect ;
18931901 self -> length = sizeof (value );
18941902 self -> data = calloc (1 , self -> length );
18951903 memcpy (self -> data , & value , self -> length );
0 commit comments