aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder/wavpack_plugin.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c
index 40eca3972..675143753 100644
--- a/src/decoder/wavpack_plugin.c
+++ b/src/decoder/wavpack_plugin.c
@@ -408,8 +408,12 @@ wavpack_input_set_pos_rel(void *id, int32_t delta, int mode)
static int
wavpack_input_push_back_byte(void *id, int c)
{
- wpin(id)->last_byte = c;
- return 1;
+ if (wpin(id)->last_byte == EOF) {
+ wpin(id)->last_byte = c;
+ return c;
+ } else {
+ return EOF;
+ }
}
static uint32_t