]> git.sesse.net Git - mlt/commitdiff
Fix regression with addition of mlt_cache.
authorDan Dennedy <dan@dennedy.org>
Sun, 13 Dec 2009 19:11:24 +0000 (11:11 -0800)
committerDan Dennedy <dan@dennedy.org>
Sun, 13 Dec 2009 19:11:24 +0000 (11:11 -0800)
This change would cause the producer to not fully initialize on the
first call to get_frame.

src/modules/avformat/producer_avformat.c

index 738647e94f55ef3590d12ac38d8d45f92f338fa2..ccafd0387a467c84bd62765f16eb558f0ca8510d 100644 (file)
@@ -194,6 +194,14 @@ mlt_producer producer_avformat_init( mlt_profile profile, char *file )
                        }
                        else
                        {
+                               // Close the file to release resources for large playlists - reopen later as needed
+                               producer_format_close( this->dummy_context );
+                               this->dummy_context = NULL;
+                               producer_format_close( this->audio_format );
+                               this->audio_format = NULL;
+                               producer_format_close( this->video_format );
+                               this->video_format = NULL;
+
                                // Default the user-selectable indices from the auto-detected indices
                                mlt_properties_set_int( properties, "audio_index",  this->audio_index );
                                mlt_properties_set_int( properties, "video_index",  this->video_index );