Skip to content

Commit 2fc81cd

Browse files
committed
code cosmetics
1 parent 2abaa2c commit 2fc81cd

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

crates/viewer/re_renderer/src/video/player.rs

+8-9
Original file line numberDiff line numberDiff line change
@@ -204,19 +204,18 @@ impl VideoPlayer {
204204
// In the presence of b-frames this order may be different!
205205

206206
// 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
208208
.data
209209
.latest_sample_index_at_presentation_timestamp(presentation_timestamp)
210-
else {
211-
return Err(VideoPlayerError::EmptyVideo);
212-
};
210+
.ok_or(VideoPlayerError::EmptyVideo)?;
213211

214212
// 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)?;
220219

221220
// Enqueue GOPs as needed.
222221

0 commit comments

Comments
 (0)