shout: clear buffer before calling the encoder

Always assume the buffer is empty before calling the encoder.  Always
flush the buffer immediately after there has been added something.
This reduces the risk of buffer overruns, because there will never be
a "rest" in the current buffer.
This commit is contained in:
Max Kellermann
2009-02-09 16:36:11 +01:00
parent 7fc25ad567
commit 1ac328b553
4 changed files with 15 additions and 18 deletions

1
NEWS
View File

@@ -50,6 +50,7 @@ ver 0.14.2 (2009/??/??)
- shout: switch to blocking mode
- shout: use libshout's synchronization
- shout: don't postpone metadata
- shout: clear buffer before calling the encoder
* mapper: remove trailing slashes from music_directory
* player: set player error when output device fails