File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ impl OpenedStream {
240
240
one_frame_in_time_base,
241
241
match freshly_seeked || self . last_position . is_none ( ) {
242
242
true => None ,
243
- false => Some ( self . last_position . unwrap ( ) ) ,
243
+ false => Some ( self . last_position . unwrap_or ( 0 ) ) ,
244
244
} ,
245
245
tone_mapped,
246
246
frame_cache_manager,
@@ -356,7 +356,7 @@ impl OpenedStream {
356
356
357
357
let previous_pts = match freshly_seeked || self . last_position . is_none ( ) {
358
358
true => None ,
359
- false => Some ( self . last_position . unwrap ( ) ) ,
359
+ false => Some ( self . last_position . unwrap_or ( 0 ) ) ,
360
360
} ;
361
361
let item = FrameCacheItem {
362
362
resolved_pts : unfiltered. pts ( ) . expect ( "expected pts" ) ,
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ impl OpenedVideoManager {
147
147
stream_index,
148
148
OpenStream {
149
149
src : video. src . clone ( ) ,
150
- last_time : video. last_position . unwrap ( ) as f64
150
+ last_time : video. last_position . unwrap_or ( 0 ) as f64
151
151
/ ( video. time_base . 1 as f64 / video. time_base . 0 as f64 ) ,
152
152
id : stream_index,
153
153
transparent : video. transparent ,
You can’t perform that action at this time.
0 commit comments