Skip to content

Commit

Permalink
Remove crashy unwrap() in on_error
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Oct 4, 2024
1 parent 4843f6f commit 85e538d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4994,7 +4994,10 @@ pub fn rav1d_submit_frame(c: &Rav1dContext, state: &mut Rav1dState) -> Rav1dResu
) {
fc.task_thread.error.store(1, Ordering::Relaxed);
let _ = mem::take(&mut *fc.in_cdf.try_write().unwrap());
if f.frame_hdr.as_ref().unwrap().refresh_context != 0 {
if f.frame_hdr
.as_ref()
.is_some_and(|frame_hdr| frame_hdr.refresh_context != 0)
{
let _ = mem::take(&mut f.out_cdf);
}
for i in 0..7 {
Expand Down

0 comments on commit 85e538d

Please sign in to comment.