Skip to content

Commit d32e8f2

Browse files
committed
Set proper video trim when changing the file
1 parent af0bf08 commit d32e8f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/import.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ pub fn parse_mlv(path: &Path, fpm: FocusPixelMap) -> Result<VideoFile, io::Error
308308

309309
let focus_pixels = load_focus_pixels(fpm, camera, raw_w, raw_h);
310310

311-
let len = frames.len();
312311
Ok(VideoFile {
313312
path: path.into(),
314313
camera,
@@ -330,7 +329,7 @@ pub fn parse_mlv(path: &Path, fpm: FocusPixelMap) -> Result<VideoFile, io::Error
330329
pc,
331330
color_params,
332331
current_frame: 0,
333-
trim: 0..len,
332+
trim: 0..frame_count,
334333
selected: false,
335334
})
336335
}
@@ -545,6 +544,7 @@ pub fn read_frames(
545544
}
546545
Frames::Dng(ref frames) => Frames::Dng(frames.clone()),
547546
};
547+
trim = video.trim;
548548
}
549549
VideoCommand::Trim(t) => {
550550
trim = t;

0 commit comments

Comments
 (0)