Skip to content

Commit

Permalink
decoder/stateless/h264: remove unneeded temporary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnurou committed Jul 9, 2024
1 parent c5c6949 commit 2fe8ab9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/decoder/stateless/h264.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1064,8 +1064,6 @@ where
first_field: Option<&RcPictureData>,
timestamp: u64,
) -> anyhow::Result<PictureData> {
let max_frame_num = sps.max_frame_num();

let mut pic = PictureData::new_from_slice(slice, sps, timestamp, first_field);
self.codec.compute_pic_order_count(&mut pic, sps)?;

Expand All @@ -1088,9 +1086,11 @@ where
}
}

self.codec
.dpb
.update_pic_nums(u32::from(slice.header.frame_num), max_frame_num, &pic);
self.codec.dpb.update_pic_nums(
u32::from(slice.header.frame_num),
sps.max_frame_num(),
&pic,
);

Ok(pic)
}
Expand Down

0 comments on commit 2fe8ab9

Please sign in to comment.