Merge branch 'simplify/b15' into simplify/w1a
Browse files at this commit1 changed file +3 -3
crates/ec-pcm-ext/src/lib.rsmodified+3 -3
| @@ -284,9 +284,6 @@ impl PcmExtDecoder { | |||
| 284 | } | 284 | } |
| 285 | } | 285 | } |
| 286 | Kind::MsAdpcm => { | 286 | Kind::MsAdpcm => { |
| 287 | - if ch > 2 { | ||
| 288 | - return Err(Error::unsupported("MS ADPCM", "more than two channels")); | ||
| 289 | - } | ||
| 290 | if data.len() < 7 * ch { | 287 | if data.len() < 7 * ch { |
| 291 | return Err(Error::corrupt("MS ADPCM: a block shorter than its header")); | 288 | return Err(Error::corrupt("MS ADPCM: a block shorter than its header")); |
| 292 | } | 289 | } |
| @@ -344,6 +341,9 @@ impl Decoder for PcmExtDecoder { | |||
| 344 | } | 341 | } |
| 345 | 342 | ||
| 346 | fn send_packet(&mut self, packet: &Packet) -> Result<()> { | 343 | fn send_packet(&mut self, packet: &Packet) -> Result<()> { |
| 344 | + if self.pending.is_some() { | ||
| 345 | + return Err(Error::NeedMore); | ||
| 346 | + } | ||
| 347 | self.decode(&packet.data)?; | 347 | self.decode(&packet.data)?; |
| 348 | let channels = self.channels; | 348 | let channels = self.channels; |
| 349 | let mut bytes = Vec::with_capacity(self.out.len() * 2); | 349 | let mut bytes = Vec::with_capacity(self.out.len() * 2); |