recover lost auto, null attach effect segv, clip picon color_model fix
authorGood Guy <good1.2guy@gmail.com>
Mon, 26 Feb 2018 22:17:56 +0000 (15:17 -0700)
committerGood Guy <good1.2guy@gmail.com>
Mon, 26 Feb 2018 22:17:56 +0000 (15:17 -0700)
cinelerra-5.1/cinelerra/autos.C
cinelerra-5.1/cinelerra/awindowgui.C
cinelerra-5.1/cinelerra/plugindialog.C

index 49a8ea1cdc6674f8afd5c6b07cb635298349dad7..ced078364c5578980abe367c9324b39109f1adf9 100644 (file)
@@ -502,15 +502,17 @@ int Autos::copy(int64_t start,
 //printf("Autos::copy 10 %d %d %p\n", default_only, start, autoof(start));
        if(active_only || (!default_only && !active_only))
        {
-               for(Auto* current = autoof(start);
-                       current && current->position <= end;
-                       current = NEXT)
-               {
+               Auto *current = autoof(start);
+// need the last one if past the end
+               if( !current && last )
+                       last->copy(start, end, file, default_only);
+
+               while( current && current->position <= end ) {
 // Want to copy single keyframes by putting the cursor on them
-                       if(current->position >= start && current->position <= end)
-                       {
+                       if( current->position >= start && current->position <= end ) {
                                current->copy(start, end, file, default_only);
                        }
+                       current = NEXT;
                }
        }
 // Copy default auto again to make it the active auto on the clipboard
index 094ef19b99aa20bb831cfb4dae9e54e5c6586596..796a739e6315b99e940bdfc968ffbf08045bfb5d 100644 (file)
@@ -622,20 +622,23 @@ void AssetPicon::create_objects()
                                        icon_vframe = VFramePng::vframe_png(clip_icon_path);
                                }
                                if( !icon_vframe ) {
+printf("render clip: %s\n", name);
                                        int edl_h = edl->get_h(), edl_w = edl->get_w();
                                        int height = edl_h > 0 ? edl_h : 1;
                                        int width = edl_w > 0 ? edl_w : 1;
+                                       int color_model = edl->session->color_model;
                                        pixmap_w = pixmap_h * width / height;
 
                                        if( gui->temp_picon &&
-                                           (gui->temp_picon->get_w() != width ||
+                                           (gui->temp_picon->get_color_model() != color_model ||
+                                            gui->temp_picon->get_w() != width ||
                                             gui->temp_picon->get_h() != height) ) {
                                                delete gui->temp_picon;  gui->temp_picon = 0;
                                        }
 
                                        if( !gui->temp_picon ) {
                                                gui->temp_picon = new VFrame(0, -1,
-                                                       width, height, BC_RGB888, -1);
+                                                       width, height, color_model, -1);
                                        }
                                        char string[BCTEXTLEN];
                                        sprintf(string, _("Rendering %s"), name);
index 8b83480bb389e0c3d15cd2e73387a7c9b5b44795..e4a2cce302126d27aab16c953c64cce7830c28c5 100644 (file)
@@ -266,11 +266,9 @@ void PluginDialog::create_objects()
                Track *track = mwindow->edl->tracks->number(plugin_locations.values[i]->module);
                char *track_title = track->title;
                int number = plugin_locations.values[i]->plugin;
-               Plugin *plugin = track->get_current_plugin(mwindow->edl->local_session->get_selectionstart(1),
-                       number,
-                       PLAY_FORWARD,
-                       1,
-                       0);
+               double start = mwindow->edl->local_session->get_selectionstart(1);
+               Plugin *plugin = track->get_current_plugin(start, number, PLAY_FORWARD, 1, 0);
+               if( !plugin ) continue;
                char string[BCTEXTLEN];
                const char *plugin_title = _(plugin->title);
                snprintf(string, sizeof(string), "%s: %s", track_title, plugin_title);