aboutsummaryrefslogtreecommitdiffstats
path: root/src/encoder/plugins/ShineEncoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-13 18:49:44 +0200
committerMax Kellermann <max@duempel.org>2014-08-13 18:49:44 +0200
commit8b7718fbdc539a799c1c081f43263813613b26a3 (patch)
tree8cf2d4b586ff84a74ae8d30d03779d9e2348ab73 /src/encoder/plugins/ShineEncoderPlugin.cxx
parentb44957ad914296cb53456d3fb56b380d81ec5fb6 (diff)
downloadmpd-8b7718fbdc539a799c1c081f43263813613b26a3.tar.gz
mpd-8b7718fbdc539a799c1c081f43263813613b26a3.tar.xz
mpd-8b7718fbdc539a799c1c081f43263813613b26a3.zip
encoder/shine: require libshine 3.1, adapt to new API
The "written" argument to shine_encode_buffer() and shine_flush() was changed from "long" to "int", which breaks API and ABI compatibility. This is a big deal, and it doesn't seem worthwile to keep support for the (broken) 3.0 release.
Diffstat (limited to 'src/encoder/plugins/ShineEncoderPlugin.cxx')
-rw-r--r--src/encoder/plugins/ShineEncoderPlugin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/encoder/plugins/ShineEncoderPlugin.cxx b/src/encoder/plugins/ShineEncoderPlugin.cxx
index 00b8eec7c..61cb8609e 100644
--- a/src/encoder/plugins/ShineEncoderPlugin.cxx
+++ b/src/encoder/plugins/ShineEncoderPlugin.cxx
@@ -172,8 +172,6 @@ bool
ShineEncoder::WriteChunk(bool flush)
{
if (flush || input_pos == frame_size) {
- long written;
-
if (flush) {
/* fill remaining with 0s */
for (; input_pos < frame_size; input_pos++) {
@@ -181,6 +179,7 @@ ShineEncoder::WriteChunk(bool flush)
}
}
+ int written;
const uint8_t *out =
shine_encode_buffer(shine, stereo, &written);
@@ -229,10 +228,11 @@ static bool
shine_encoder_flush(Encoder *_encoder, gcc_unused Error &error)
{
ShineEncoder *encoder = (ShineEncoder *)_encoder;
- long written;
/* flush buffers and flush shine */
encoder->WriteChunk(true);
+
+ int written;
const uint8_t *data = shine_flush(encoder->shine, &written);
if (written > 0)