X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fcinelerra%2Fedit.C;h=d1421020e42536a57a2a393ae560f6f5f1960513;hb=6c0c8bd0e577001d1cc18c6c27d58e62f58a6bff;hp=6bf265d761b4d684734e0bf8ac579c9af0834ef0;hpb=2d99bb8ce591f05a31464b517d85dc2bc35b2abe;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/cinelerra/edit.C b/cinelerra-5.0/cinelerra/edit.C index 6bf265d7..d1421020 100644 --- a/cinelerra-5.0/cinelerra/edit.C +++ b/cinelerra-5.0/cinelerra/edit.C @@ -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()