X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fcinelerra%2Fassetedit.C;h=5422d97eef2c77cc954b099022010a3f34746457;hb=6c0c8bd0e577001d1cc18c6c27d58e62f58a6bff;hp=e52f39c7b0e6d9aa0a5276df2529e9efeb14d66a;hpb=91efd376233a15f6572e6f68d28a5bee69797e87;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/cinelerra/assetedit.C b/cinelerra-5.0/cinelerra/assetedit.C index e52f39c7..5422d97e 100644 --- a/cinelerra-5.0/cinelerra/assetedit.C +++ b/cinelerra-5.0/cinelerra/assetedit.C @@ -796,9 +796,14 @@ DetailAssetThread::DetailAssetThread(MWindow *mwindow) } DetailAssetThread::~DetailAssetThread() +{ + stop(); +} + +void DetailAssetThread::stop() { if( Thread::running() ) { - dwindow->lock_window("DetailAssetThread::~DetailAssetThread"); + dwindow->lock_window("DetailAssetThread::stop"); dwindow->set_done(1); dwindow->unlock_window(); Thread::join(); @@ -814,10 +819,10 @@ void DetailAssetWindow::create_objects() if( !mwindow->preferences->get_asset_file_path(asset, file_name) ) { switch( asset->format ) { case FILE_MPEG: - FileMPEG::get_info(asset->path, file_name, &info[0]); + FileMPEG::get_info(asset->path, file_name, &info[0],len); break; case FILE_FFMPEG: - FileFFMPEG::get_info(asset->path, &info[0]); + FileFFMPEG::get_info(asset->path, &info[0],len); break; } } @@ -831,11 +836,10 @@ void DetailAssetWindow::create_objects() void DetailAssetThread::start(Asset *asset) { - if( !Thread::running() ) { - delete dwindow; - dwindow = new DetailAssetWindow(mwindow, asset); - Thread::start(); - } + stop(); + delete dwindow; + dwindow = new DetailAssetWindow(mwindow, asset); + Thread::start(); } void DetailAssetThread::run()