]> git.tuebingen.mpg.de Git - paraslash.git/commit
fecdec: Fix decoding of the audio file header.
authorAndre Noll <maan@systemlinux.org>
Thu, 22 Oct 2009 17:21:10 +0000 (19:21 +0200)
committerAndre Noll <maan@systemlinux.org>
Thu, 22 Oct 2009 17:21:10 +0000 (19:21 +0200)
commitb46e786ab743f807d627eac3c3321e5e39d3d299
treee524fbbacb23ade7d2923da5441d0d7224e9243c
parentac6cf1cb1b7013422360f703f82c92716376de3a
fecdec: Fix decoding of the audio file header.

The handling of the audio file header in the fecdec code is currently
broken: We output all decoded header slices although the last slice
might only be partially used.

This patch introduces the new fec_group_usability value
"FEC_GROUP_USABLE_WITH_HEADER" which gets used when streaming starts in
the middle of the file. In this case, after the group has been decoded,
we make sure that only h.audio_header_size many bytes are being written
to the output buffer. We then proceed to write the output corresponding
to the data slices as in the FEC_GROUP_USABLE_SKIP_HEADER case.

In paraslash-0.3. only ogg vorbis uses audio file headers, and the
ogg code is quite forgiving and successfully resyncs the stream,
which is why this bug was never noticed. However, the wma decoder of
paraslash-0.4 fails badly due to the garbage that is written after
the header.
fecdec_filter.c