]> git.sesse.net Git - mlt/commitdiff
fix synchronizing consumer properties with the profile
authorDan Dennedy <dan@dennedy.org>
Tue, 4 Sep 2012 06:44:03 +0000 (23:44 -0700)
committerDan Dennedy <dan@dennedy.org>
Tue, 4 Sep 2012 06:44:03 +0000 (23:44 -0700)
If you change the profile struct then you can stop and restart the
consumer for the changes to take affect. Previously, you had to close
the consumer and re-open it.

src/framework/mlt_consumer.c

index 122f66b0fc29949aff696505164e532c981ad6f7..2a350a76abf8ecf4e529bfdcd2d9cee93a9b3bb3 100644 (file)
@@ -449,6 +449,9 @@ int mlt_consumer_start( mlt_consumer self )
                mlt_properties_set_data( properties, "test_card_producer", NULL, 0, NULL, NULL );
        }
 
+       // The profile could have changed between a stop and a restart.
+       apply_profile_properties( self, mlt_service_profile( MLT_CONSUMER_SERVICE(self) ), properties );
+
        // Set the frame duration in microseconds for the frame-dropping heuristic
        int frame_rate_num = mlt_properties_get_int( properties, "frame_rate_num" );
        int frame_rate_den = mlt_properties_get_int( properties, "frame_rate_den" );