diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/demuxers/demux_wav.c | 13 |
2 files changed, 11 insertions, 4 deletions
@@ -18,6 +18,8 @@ xine-lib (1.1.16) 2008-??-?? * Fix MMS media requests where the URI contains %-encoded characters. * Fix two hangs related to stopping playback of broken audio streams where no audio data is sent to the output thread. + * Fix WAV demuxer to send the last frames when they don't fit perfectly into + the buffer xine-lib (1.1.15) 2008-08-14 * Security fixes: diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c index 5fbec7b69..5f39395ad 100644 --- a/src/demuxers/demux_wav.c +++ b/src/demuxers/demux_wav.c @@ -209,11 +209,16 @@ static int demux_wav_send_chunk(demux_plugin_t *this_gen) { buf->size = remaining_sample_bytes; remaining_sample_bytes -= buf->size; - if (this->input->read(this->input, buf->content, buf->size) != + off_t read; + if ((read = this->input->read(this->input, buf->content, buf->size)) != buf->size) { - buf->free_buffer(buf); - this->status = DEMUX_FINISHED; - break; + if (read == 0) { + buf->free_buffer(buf); + this->status = DEMUX_FINISHED; + break; + } else { + buf->size = read; + } } #if 0 |