add binfolder path relative filters, fix gbrp color model, vwdw timebar tweaks, title...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / vmodule.C
index 28f5a6d323db3e20d94acd23129b6b54dcff1a80..3ef17f0436d714bf0aa4175ed9f6e292a3f1cf89 100644 (file)
@@ -159,9 +159,10 @@ int VModule::import_frame(VFrame *output, VEdit *current_edit,
                        __LINE__, nested_edl, current_edit->nested_edl);
 
 // Convert requested direction to command
-               if(renderengine->command->command == CURRENT_FRAME)
+               if( renderengine->command->command == CURRENT_FRAME ||
+                   renderengine->command->command == LAST_FRAME )
                {
-                       command = CURRENT_FRAME;
+                       command = renderengine->command->command;
                }
                else
                if(direction == PLAY_REVERSE)
@@ -222,7 +223,14 @@ int VModule::import_frame(VFrame *output, VEdit *current_edit,
        }
        if(debug) printf("VModule::import_frame %d\n", __LINE__);
 
-       if(!output) printf("VModule::import_frame %d output=%p\n", __LINE__, output);
+       if( output ) {
+               if( use_opengl )
+                       x11_device->clear_input(output);
+               else
+                       output->clear_frame();
+       }
+       else
+               printf("VModule::import_frame %d output=%p\n", __LINE__, output);
 
        if(current_edit &&
                (current_edit->asset ||
@@ -478,12 +486,9 @@ int VModule::import_frame(VFrame *output, VEdit *current_edit,
 
                                if(!(*input))
                                {
-                                       (*input) = new VFrame(0,
-                                               -1,
-                                               asset_w,
-                                               asset_h,
-                                               get_edl()->session->color_model,
-                                               -1);
+                                       (*input) =
+                                               new VFrame(asset_w, asset_h,
+                                                       get_edl()->session->color_model);
                                }
 
 
@@ -873,15 +878,6 @@ current_cmodel);
                else
 // Source not found
                {
-                       if(debug) printf("VModule::import_frame %d\n", __LINE__);
-                       if(use_opengl)
-                       {
-                               x11_device->clear_input(output);
-                       }
-                       else
-                       {
-                               output->clear_frame();
-                       }
                        result = 1;
                }
 
@@ -989,12 +985,9 @@ int VModule::render(VFrame *output,
 // Load incoming frame
                if(!(*transition_input))
                {
-                       (*transition_input) = new VFrame(0,
-                               -1,
-                               track->track_w,
-                               track->track_h,
-                               get_edl()->session->color_model,
-                               -1);
+                       (*transition_input) =
+                               new VFrame(track->track_w, track->track_h,
+                                       get_edl()->session->color_model);
                }
 
                (*transition_input)->copy_stacks(output);