diff options
author | Lorenzo Desole <lorenzodes@fastwebnet.it> | 2009-01-02 20:49:43 +0100 |
---|---|---|
committer | Lorenzo Desole <lorenzodes@fastwebnet.it> | 2009-01-02 20:49:43 +0100 |
commit | 36591267df06370105922e368505ea5cc8512882 (patch) | |
tree | 6345c6e592a319d29a54de8e696bd84ee38fd5f9 | |
parent | 3d89312bd0301ed4d08bd4a6502741c01560ac48 (diff) | |
download | xine-lib-36591267df06370105922e368505ea5cc8512882.tar.gz xine-lib-36591267df06370105922e368505ea5cc8512882.tar.bz2 |
ff_audio_decode_data() doesn't always return if the stream is closed or playback stopped.
-rw-r--r-- | src/combined/ffmpeg/ff_audio_decoder.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/combined/ffmpeg/ff_audio_decoder.c b/src/combined/ffmpeg/ff_audio_decoder.c index e0d294113..2a6c04dd3 100644 --- a/src/combined/ffmpeg/ff_audio_decoder.c +++ b/src/combined/ffmpeg/ff_audio_decoder.c @@ -367,6 +367,11 @@ static void ff_audio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) /* 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) { |