add adams 4.6->4.6.1 (mostly)
[goodguy/history.git] / cinelerra-5.0 / cinelerra / pluginserver.C
index 66abd3bd87364c8ae9eb57755bcec0ce4a4dfc7c..17e1b17e7afdd34b023f9be5fbb73785e071b82e 100644 (file)
@@ -530,14 +530,19 @@ void PluginServer::process_buffer(VFrame **frame,
                vclient->input[i] = frame[i];
                vclient->output[i] = frame[i];
        }
-       vclient->source_start = (int64_t)(plugin ? 
-               plugin->startproject * 
-               frame_rate /
-               vclient->project_frame_rate :
-               0);
+       
+       if(plugin)
+       {
+               vclient->source_start = (int64_t)plugin->startproject * 
+                       frame_rate /
+                       vclient->project_frame_rate;
+       }
        vclient->direction = direction;
 
 
+//PRINT_TRACE
+//printf("plugin=%p source_start=%ld\n", plugin, vclient->source_start);
+
        vclient->begin_process_buffer();
        if(multichannel)
        {
@@ -660,6 +665,10 @@ int PluginServer::get_parameters(int64_t start, int64_t end, int channels)
        client->source_start = start;
        client->total_len = end - start;
        client->total_in_buffers = channels;
+
+//PRINT_TRACE
+//printf(" source_start=%ld total_len=%ld\n", client->source_start, client->total_len);
+
        return client->plugin_get_parameters();
 }
 
@@ -802,6 +811,7 @@ int PluginServer::read_frame(VFrame *buffer,
 // If we're a VirtualNode, read_data in the virtual plugin node handles
 //     backward propogation and produces the data.
 // If we're a Module, render in the module produces the data.
+//PRINT_TRACE
 
        int result = -1;
        if(!multichannel) channel = 0;