File tree 1 file changed +8
-9
lines changed
crates/viewer/re_renderer/src/video
1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -204,19 +204,18 @@ impl VideoPlayer {
204
204
// In the presence of b-frames this order may be different!
205
205
206
206
// Find sample which when decoded will be presented at the timestamp the user requested.
207
- let Some ( requested_sample_idx) = self
207
+ let requested_sample_idx = self
208
208
. data
209
209
. latest_sample_index_at_presentation_timestamp ( presentation_timestamp)
210
- else {
211
- return Err ( VideoPlayerError :: EmptyVideo ) ;
212
- } ;
210
+ . ok_or ( VideoPlayerError :: EmptyVideo ) ?;
213
211
214
212
// Find the GOP that contains the sample.
215
- let Some ( requested_gop_idx) = self . data . gop_index_containing_decode_timestamp (
216
- self . data . samples [ requested_sample_idx] . decode_timestamp ,
217
- ) else {
218
- return Err ( VideoPlayerError :: EmptyVideo ) ;
219
- } ;
213
+ let requested_gop_idx = self
214
+ . data
215
+ . gop_index_containing_decode_timestamp (
216
+ self . data . samples [ requested_sample_idx] . decode_timestamp ,
217
+ )
218
+ . ok_or ( VideoPlayerError :: EmptyVideo ) ?;
220
219
221
220
// Enqueue GOPs as needed.
222
221
You can’t perform that action at this time.
0 commit comments