Skip to content

Commit

Permalink
Merge pull request #3 from michaelherger/philippe44
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 authored Apr 4, 2019
2 parents cf7ff7b + 37a63b6 commit ec132f4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions audio/src/passthrough_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ impl<R: Read + Seek> AudioDecoder for PassthroughDecoder<R> {
break;
}
}
if rd == 0 {
return Ok(None);
}

if rd == 0 {
return Ok(None);
}

// This will insert an extraneous 0 byte at EOF if the file size was not an even number of bytes
let s16 = mem::size_of::<i16>(); // Yes, I know it is always 2
rd += (s16 - (rd % s16)) % s16;
Expand Down

0 comments on commit ec132f4

Please sign in to comment.