add shuttle udev rules to doc, fix still images drag handle
authorGood Guy <[email protected]>
Tue, 29 Jan 2019 21:26:32 +0000 (14:26 -0700)
committerGood Guy <[email protected]>
Tue, 29 Jan 2019 21:26:32 +0000 (14:26 -0700)
cinelerra-5.1/cinelerra/vedit.C

index c40f72d8b31efb01b2c927e308419a6672a9c5c6..eaa28c1a1d27290a684c60948185d4afdfc7e7e8 100644 (file)
@@ -145,13 +145,12 @@ int64_t VEdit::get_source_end(int64_t default_)
 {
        if(!nested_edl && !asset) return default_;   // Infinity
 
-       if(nested_edl)
-       {
+       if( nested_edl ) {
                return (int64_t)(nested_edl->tracks->total_length() *
                        edl->session->frame_rate + 0.5);
        }
 
-       return (int64_t)((double)asset->video_length /
-               asset->frame_rate *
-               edl->session->frame_rate + 0.5);
+       return asset->video_length < 0 ? default_ :
+                (int64_t)((double)asset->video_length /
+                       asset->frame_rate * edl->session->frame_rate + 0.5);
 }