S8: check_supported runs after SliceHeader parsing (malformed headers report Corrupt first; supported streams unchanged)
Browse files at this commit9d32686c2eaa3bfd8a802accf08603877bffe90cParent: 756640e1 changed file +1 -1
crates/ec-h264/src/decoder.rsmodified+1 -1
| @@ -874,8 +874,8 @@ impl<S: Sample> Core<S> { | ||
| 874 | 874 | let sps = self.sps_map[pps.sps_id as usize] |
| 875 | 875 | .clone() |
| 876 | 876 | .ok_or_else(|| Error::corrupt("PPS refers to an unknown SPS"))?; |
| 877 | - check_supported::<S>(&sps, &pps, slice_type_code, self.wide)?; | |
| 878 | 877 | let sh = SliceHeader::parse(rbsp, header, &sps, &pps)?; |
| 878 | + check_supported::<S>(&sps, &pps, slice_type_code, self.wide)?; | |
| 879 | 879 | if self.has_picture && !self.cur.complete { |
| 880 | 880 | let same_picture = self.cur_key == Some(PicKey::of(&sh, header)); |
| 881 | 881 | // A picture starts again at macroblock 0 once macroblock 0 is |