]> git.sesse.net Git - mlt/commitdiff
Fix melt crash on many avformat producers active.
authorDan Dennedy <dan@dennedy.org>
Sun, 4 Sep 2011 19:55:16 +0000 (12:55 -0700)
committerDan Dennedy <dan@dennedy.org>
Sun, 4 Sep 2011 19:55:16 +0000 (12:55 -0700)
src/modules/melt/producer_melt.c

index 69bcad8c0a1cdeb9993e56838bcae849232e61bf..7b8730ff97f0ee4686a8466ce1f271c93a5df250 100644 (file)
@@ -449,6 +449,9 @@ mlt_producer producer_melt_init( mlt_profile profile, mlt_service_type type, con
                }
        }
 
+       // Set the size of the producer_avformat cache to the number of tracks.
+       mlt_service_cache_set_size( MLT_PLAYLIST_SERVICE( playlist ), "producer_avformat", track + 1 );
+
        // Connect last producer to playlist
        if ( producer != NULL && !mlt_producer_is_cut( producer ) )
                mlt_playlist_append( playlist, producer );