From: Lorenzo D. <lor...@fa...> - 2009-01-02 20:26:24
|
# HG changeset patch # User Lorenzo Desole <lor...@fa...> # Date 1230925783 -3600 # Node ID 2c5059a74b28ecb5e8934f2f316f8f3f4d17184e # Parent 40994e8860fd1f8090a15dee0067e2374bce089d ff_audio_decode_data() doesn't always return if the stream is closed or playback stopped. diff -r 2c5059a74b28ecb5e8934f2f316f8f3f4d17184e -r 40994e8860fd1f8090a15dee0067e2374bce089d src/combined/ffmpeg/ff_audio_decoder.c --- a/src/combined/ffmpeg/ff_audio_decoder.c Fri Jan 02 20:49:43 2009 +0100 +++ b/src/combined/ffmpeg/ff_audio_decoder.c Thu Jan 01 18:06:22 2009 +0000 @@ -367,6 +367,11 @@ static void ff_audio_decode_data (audio_ /* dispatch the decoded audio */ out = 0; while (out < decode_buffer_size) { + int stream_status = xine_get_status(this->stream); + + if (stream_status == XINE_STATUS_QUIT || stream_status == XINE_STATUS_STOP) + return; + audio_buffer = this->stream->audio_out->get_buffer (this->stream->audio_out); if (audio_buffer->mem_size == 0) { |