]> git.tuebingen.mpg.de Git - paraslash.git/commit
oggdec: Fix EOF handling on repositioning.
authorAndre Noll <maan@systemlinux.org>
Sun, 3 Jun 2012 09:59:42 +0000 (11:59 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 3 Jun 2012 11:04:01 +0000 (13:04 +0200)
commit3f96f9c305ff0c57ef10c523a2c45a4045f32dde
treed61b21310947bf538bbddbc93b9d5fae067132f9
parentc7e2f73900021e5b3f655c91a7cc0fdda76bd0ec
oggdec: Fix EOF handling on repositioning.

If playback starts near the end of the file, it might happen that (a)
the read callback consumes all the remaining part in one go (so the
node status is BTR_EOF) and (b) the last ov_read() returned OV_HOLE.

(b) makes the decoder wait for more data which will never arrive due to
(a). Currently we error out without playing the last part of the file.

This patch makes ogg_post_select() return an error only if additionally
fn->min_iqs == 0, which indicates we did not hit OV_HOLE during the
last ov_read().
oggdec_filter.c