]> git.tuebingen.mpg.de Git - paraslash.git/commit
mp3dec: Improve bad main_data_begin pointer error handling.
authorAndre Noll <maan@systemlinux.org>
Mon, 31 Aug 2009 19:17:21 +0000 (21:17 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 31 Aug 2009 19:17:21 +0000 (21:17 +0200)
commit165a3886ab506f4c13eac4f178a58493432a00ec
tree330de67d3e7028ac120fe551f50877cb06a5c906
parent4e3d8370476eee8537d8dc325d588fca43928098
mp3dec: Improve bad main_data_begin pointer error handling.

These errors from mad_frame_decode() are non-fatal and happen if the
stream is started at the middle of the file, e.g. when para_audiod
is started while para_server is already streaming.

If libmad encounters such an error it throws away the first (and
probably the second) frame which messes up the timing in udp/fec mode,
causing an audible buffer underrun after the remaining frames of the
first fec group have been decoded and fed to the writer.

This patch makes the mp3dec filter keep track of bad main_data_begin
pointer errors that happen at the start of the stream. In this case
decoding is deferred until more data has arrived or 60ms have passed.
mp3dec_filter.c