flacdec: fix intermittent FLAC__STREAM_DECODER_ABORTED errors when seeking
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 21 Jul 2009 18:46:55 +0000 (19:46 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 21 Jul 2009 18:58:04 +0000 (19:58 +0100)
commit375976c847b80ab40ff30e1e5cef91ff12bddf50
tree509bfafb8ecae5193adabcc7001ae48f6e394cb8
parent89903987332864891691e511b8ef56022ac85ea4
flacdec: fix intermittent FLAC__STREAM_DECODER_ABORTED errors when seeking

When seeking in a local flac file (ie. operating pull-based), the decoder
would often just error out after the loop function sees a DECODER_ABORTED
status. This, however, is the read callback's way of telling our loop
function that pull_range failed and streaming should stop, in this case
because of the flush-start event that the seek handler pushed upstream
from the seeking thread. Handle this slightly better by storing the last
flow return from pull_range, so the loop function can evaluate it properly
when it encounters a DECODER_ABORTED and take the right action.

Fixes #578612.
ext/flac/gstflacdec.c
ext/flac/gstflacdec.h