Skip to content

Commit

Permalink
riff: fix parsing ffmpeg wave stdout output
Browse files Browse the repository at this point in the history
  • Loading branch information
sscobici committed Dec 23, 2024
1 parent 25aadc9 commit d0eb7ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions symphonia-format-riff/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ impl<T: ParseChunkTag> ChunksReader<T> {
// input, it may overflow when if added to anything.
if self.len - self.consumed < len {
// When ffmpeg encodes wave to stdout the riff (parent) and data chunk lengths are
// (2^32)-1 since the size can't be known ahead of time.
if !(self.len == len && len == u32::MAX) {
// (2^32)-1 since the size can't be known ahead of time. Parent length was reduced by 4 to read "form type"
if !(self.len + 4 == u32::MAX && len == u32::MAX) {
debug!(
"chunk length of {} exceeds parent (list) chunk length",
String::from_utf8_lossy(&tag)
Expand Down

0 comments on commit d0eb7ac

Please sign in to comment.