rework android-rmt display, add a few buttons
[goodguy/history.git] / cinelerra-5.0 / cinelerra / edit.C
index 6bf265d761b4d684734e0bf8ac579c9af0834ef0..a02e6a8bc0f4c5eae42f53b24a2823b4df1dc625 100644 (file)
@@ -161,9 +161,9 @@ int Edit::copy(int64_t start,
                                char output_directory[BCTEXTLEN];
                                FileSystem fs;
 
-//printf("Edit::copy 6 %s\n", asset->path);
+//printf("Edit::copy %d %s\n", __LINE__, asset->path);
                                fs.extract_dir(asset_directory, asset->path);
-//printf("Edit::copy 6 %s\n", asset->path);
+//printf("Edit::copy %d %s\n", __LINE__, asset->path);
 
                                if(output_path)
                                        fs.extract_dir(output_directory, output_path);
@@ -340,16 +340,16 @@ double Edit::frame_w()
 
 double Edit::picon_w()
 {
-       if(asset)
-               return (double)edl->local_session->zoom_track * 
-                       asset->width / 
-                       asset->height;
-       if(nested_edl)
-               return (double)edl->local_session->zoom_track * 
-                       nested_edl->session->output_w / 
-                       nested_edl->session->output_h;
-
-       return 0;
+       int w = 0, h = 0;
+       if(asset) {
+               w = asset->width;
+               h = asset->height;
+       }
+       else if(nested_edl) {
+               w = nested_edl->session->output_w;
+               h = nested_edl->session->output_h;
+       }
+       return w>0 && h>0 ? ((double)edl->local_session->zoom_track*w)/h : 0;
 }
 
 int Edit::picon_h()