diff --git a/crates/ec-h264/src/decoder.rs b/crates/ec-h264/src/decoder.rs index f563804c..a1763f93 100644 --- a/crates/ec-h264/src/decoder.rs +++ b/crates/ec-h264/src/decoder.rs @@ -874,8 +874,8 @@ impl Core { let sps = self.sps_map[pps.sps_id as usize] .clone() .ok_or_else(|| Error::corrupt("PPS refers to an unknown SPS"))?; - check_supported::(&sps, &pps, slice_type_code, self.wide)?; let sh = SliceHeader::parse(rbsp, header, &sps, &pps)?; + check_supported::(&sps, &pps, slice_type_code, self.wide)?; if self.has_picture && !self.cur.complete { let same_picture = self.cur_key == Some(PicKey::of(&sh, header)); // A picture starts again at macroblock 0 once macroblock 0 is