From 099132c524d32342be6cfc4948ecb1b3a439b988 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Fri, 8 May 2020 16:23:54 -0600 Subject: [PATCH] fix a/v module nested command setup --- cinelerra-5.1/cinelerra/amodule.C | 11 +++++------ cinelerra-5.1/cinelerra/vmodule.C | 22 ++++++++-------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/cinelerra-5.1/cinelerra/amodule.C b/cinelerra-5.1/cinelerra/amodule.C index c45935e5..5de58f4e 100644 --- a/cinelerra-5.1/cinelerra/amodule.C +++ b/cinelerra-5.1/cinelerra/amodule.C @@ -281,13 +281,12 @@ int AModule::import_samples(AEdit *edit, edit_sample_rate = nested_edl->session->sample_rate; int command = direction == PLAY_REVERSE ? NORMAL_REWIND : NORMAL_FWD; - if( !nested_command ) { + if( !nested_command ) nested_command = new TransportCommand; - nested_command->command = command; - nested_command->get_edl()->copy_all(nested_edl); - nested_command->change_type = CHANGE_ALL; - nested_command->realtime = renderengine->command->realtime; - } + nested_command->command = command; + nested_command->get_edl()->copy_all(nested_edl); + nested_command->change_type = CHANGE_ALL; + nested_command->realtime = renderengine->command->realtime; if( !nested_renderengine ) { nested_renderengine = new RenderEngine(0, get_preferences(), 0, 1); nested_renderengine->set_acache(get_cache()); diff --git a/cinelerra-5.1/cinelerra/vmodule.C b/cinelerra-5.1/cinelerra/vmodule.C index 6659dd45..2239ec20 100644 --- a/cinelerra-5.1/cinelerra/vmodule.C +++ b/cinelerra-5.1/cinelerra/vmodule.C @@ -176,21 +176,15 @@ int VModule::import_frame(VFrame *output, VEdit *current_edit, delete nested_renderengine; nested_renderengine = 0; } - - if( !nested_command ) { + if( !nested_command ) nested_command = new TransportCommand; - } - - - if( !nested_renderengine ) { - nested_command->command = command; - nested_command->get_edl()->copy_all(nested_edl); - nested_command->change_type = CHANGE_ALL; - nested_command->realtime = renderengine->command->realtime; - nested_renderengine = new RenderEngine(0, get_preferences(), 0, 1); - nested_renderengine->set_vcache(get_cache()); - nested_renderengine->arm_command(nested_command); - } + nested_command->command = command; + nested_command->get_edl()->copy_all(nested_edl); + nested_command->change_type = CHANGE_ALL; + nested_command->realtime = renderengine->command->realtime; + nested_renderengine = new RenderEngine(0, get_preferences(), 0, 1); + nested_renderengine->set_vcache(get_cache()); + nested_renderengine->arm_command(nested_command); } else { -- 2.26.2