Skip to content

Commit

Permalink
decoder/h264: consolidate code modifying picture to one place
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnurou committed Feb 14, 2024
1 parent 7b9e422 commit d6f96df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/decoder/stateless/h264.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1157,13 +1157,11 @@ where
let max_frame_num = sps.max_frame_num() as i32;

let mut pic = PictureData::new_from_slice(slice, &sps, timestamp);

self.codec.compute_pic_order_count(&mut pic, &sps)?;
if let Some(first_field) = first_field {
pic.set_first_field_to(first_field);
}

self.codec.compute_pic_order_count(&mut pic, &sps)?;

if matches!(pic.is_idr, IsIdr::Yes { .. }) {
// C.4.5.3 "Bumping process"
// The bumping process is invoked in the following cases:
Expand Down

0 comments on commit d6f96df

Please sign in to comment.