From: Dan Dennedy Date: Fri, 27 May 2011 03:45:55 +0000 (-0700) Subject: Revert "Try to fix segfault (3306947)." X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=89b55ec22d52c6f49ada907d82c60ae4ba567853;p=melted Revert "Try to fix segfault (3306947)." This reverts commit 91af795798049db85f9ad3814edc85fd474a5866. --- diff --git a/src/melted/melted_unit.c b/src/melted/melted_unit.c index c25d27f..9f68cc6 100644 --- a/src/melted/melted_unit.c +++ b/src/melted/melted_unit.c @@ -34,7 +34,6 @@ #include #include #include -#include #include @@ -286,31 +285,15 @@ mvcp_error_code melted_unit_load( melted_unit unit, char *clip, int32_t in, int3 { mlt_properties properties = unit->properties; mlt_playlist playlist = mlt_properties_get_data( properties, "playlist", NULL ); - mlt_producer producer = MLT_PLAYLIST_PRODUCER( playlist ); - int original = mlt_producer_get_playtime( producer ); - mlt_consumer consumer = mlt_properties_get_data( unit->properties, "consumer", NULL ); - double speed = mlt_producer_get_speed( producer ); - struct timespec tm = { 1, 0 }; - + int original = mlt_producer_get_playtime( MLT_PLAYLIST_PRODUCER( playlist ) ); mlt_service_lock( MLT_PLAYLIST_SERVICE( playlist ) ); mlt_playlist_append_io( playlist, instance, in, out ); + mlt_playlist_remove_region( playlist, 0, original ); mlt_service_unlock( MLT_PLAYLIST_SERVICE( playlist ) ); - // We try to ensure all frames from producers that will be removed are closed. - mlt_producer_seek( producer, original ); - mlt_consumer_purge( consumer ); - melted_log( LOG_DEBUG, "loaded clip %s", clip ); update_generation( unit ); melted_unit_status_communicate( unit ); mlt_producer_close( instance ); - - // Give more time for those frames to be closed - there could still be some - // in the consumer plugin that were not purged from the base consumer buffer. - nanosleep( &tm, NULL ); - mlt_service_lock( MLT_PLAYLIST_SERVICE( playlist ) ); - mlt_playlist_remove_region( playlist, 0, original ); - mlt_service_unlock( MLT_PLAYLIST_SERVICE( playlist ) ); - return mvcp_ok; }