]> git.tuebingen.mpg.de Git - paraslash.git/commit
[mp3_afh]: Ignore junk at the end of an mp3 file.
authorAndre Noll <maan@systemlinux.org>
Thu, 23 Apr 2009 11:39:04 +0000 (13:39 +0200)
committerAndre Noll <maan@systemlinux.org>
Thu, 23 Apr 2009 11:39:04 +0000 (13:39 +0200)
commit86190b3a6a52624884f62ef4f8dca83f4f95597a
treef7b0934fc1d5828f917800e227e92b740ca7aac3
parent35f9051506345255c7ed3c076b7df5f3b7d26039
[mp3_afh]: Ignore junk at the end of an mp3 file.

There are mp3 files containing large areas of zeros at the end of the
file. The old code in mp3_afh.c would include these zeros in the last
chunk of the file.

This leads to unnecessary network traffic as including this area in
a chunk means that useless data is going to be sent to the client.
More importantly, it causes the udp sender to bail out because such
large chunks can not be fec-encoded, even with the maximal number
of slices.

This patch uses frame_start+frame_length instead of the file size as
the end of the last chunk which avoids this particular problem.
mp3_afh.c