]> git.sesse.net Git - mlt/blobdiff - src/modules/core/producer_melt.c
Add a reference to the consumer on the frame.
[mlt] / src / modules / core / producer_melt.c
index 47307f643b2142a847e4f97f0867b84870f5f4fc..7e56cf3ce99ebb62b4926d60d5d97dbd0ec57467 100644 (file)
@@ -41,6 +41,7 @@ mlt_producer producer_melt_file_init( mlt_profile profile, mlt_service_type type
                        if ( strcmp( temp, "" ) )
                                args[ count ++ ] = strdup( temp );
                }
+               fclose( input );
        }
 
        mlt_producer result = producer_melt_init( profile, type, id, args );
@@ -462,8 +463,8 @@ mlt_producer producer_melt_init( mlt_profile profile, mlt_service_type type, con
        track_service( field, playlist, ( mlt_destructor )mlt_playlist_close );
 
        // We must have a playlist to connect
-       if ( !mlt_properties_get_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_melt_first" ) || 
-                 mlt_producer_get_playtime( MLT_PLAYLIST_PRODUCER( playlist ) ) > 0 )
+       if ( playlist && ( !mlt_properties_get_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_melt_first" ) ||
+                  mlt_producer_get_playtime( MLT_PLAYLIST_PRODUCER( playlist ) ) > 0 ) )
                mlt_multitrack_connect( multitrack, MLT_PLAYLIST_PRODUCER( playlist ), track );
 
        mlt_producer prod = MLT_TRACTOR_PRODUCER( tractor );