#202 A fix to mlt_property data serialization

head
closed
Dan Dennedy
None
5
2014-06-30
2013-12-21
Jakub Ksiezniak
No

Hello,

Recently, I've been working on upgrading the videostab module and I've noticed that there seems to be a bug in mlt_property_pass function, while trying to serialize vectors to xml.

It appears that the mlt_property_pass() tries to serialize data to the string, but it fails, because it expects the data and the serializer function to be bound to "self" property, whereas both data and serializer function are found in "that" property.

Please, find below a diff with a proposed fix.

--
Best regards,
Jakub Ksiezniak

diff --git a/src/framework/mlt_property.c b/src/framework/mlt_property.c
index 8339c81..64e0592 100644
--- a/src/framework/mlt_property.c
+++ b/src/framework/mlt_property.c
@@ -774,10 +774,10 @@
        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 );
 }

Discussion

  • Dan Dennedy
    Dan Dennedy
    2013-12-21

    • status: open --> accepted
    • assigned_to: Dan Dennedy
     
  • Dan Dennedy
    Dan Dennedy
    2013-12-21

    Yes! thank you. Patch applied in git commit 0ae409f. I will close this ticket on the next release.

     
  • Dan Dennedy
    Dan Dennedy
    2014-06-30

    • status: accepted --> closed