MP3 garbage detection has to use the proper offsets for MP3 header decoding.

This commit is contained in:
Moritz Bunkus 2004-06-12 08:34:22 +00:00
parent 28d202b31e
commit 870ac2a4a3
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2004-06-12 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: bug fix: The improved MP3 garbage detection was broken
resulting in an error message from mkvmerge in some weird
situations.
2004-06-08 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: bug fix: Matroska tracks can use lacing (several

View File

@ -163,7 +163,8 @@ mp3_reader_c::find_valid_headers(mm_io_c *mm_io) {
mxverb(2, "mp3_reader: Second header search, second header? %d\n", pos2);
if (pos2 < 0)
return -1;
decode_mp3_header(&buf[offset + pos + pos2], &mp3header);
decode_mp3_header(&buf[offset + pos + mp3header.framesize + pos2],
&mp3header);
mxverb(2, "mp3_reader: Second header search, second header at %d + %d "
"(version: %d, layer: %d, sampling freq: %d, channels: %d, "
"bitrate: %d)\n", offset + pos, pos2, mp3header.version,