- new_command = 0;
-// if(command) delete command;
-// command = new_command;
- }
- else
- if(new_command->command == BRenderCommand::BRENDER_RESTART)
- {
-// Compare EDL's and get last equivalent position in new EDL
- if(command && command->edl)
- new_command->position =
- new_command->edl->equivalent_output(command->edl);
- else
- new_command->position = 0;
-
-
- stop();
-//printf("BRenderThread::run 4\n");
- brender->completion_lock->lock("BRenderThread::run 4");
-//printf("BRenderThread::run 5\n");
-
- if(new_command->edl->tracks->total_playable_vtracks())
- {
- if(command) delete command;
+ brender->completion_lock->unlock();
+ break;
+ case BRenderCommand::BRENDER_RESTART:
+ new_command->position = command && command->edl ?
+ new_command->edl->equivalent_output(command->edl) : 0;
+ delete command; command = 0;
+ if( new_command->edl->tracks->total_playable_vtracks() ) {