summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/wavpack/gstwavpackstreamreader.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/wavpack/gstwavpackstreamreader.c b/ext/wavpack/gstwavpackstreamreader.c
index 074a2e7d5..da1fdc27b 100644
--- a/ext/wavpack/gstwavpackstreamreader.c
+++ b/ext/wavpack/gstwavpackstreamreader.c
@@ -78,9 +78,10 @@ gst_wavpack_stream_reader_push_back_byte (void *id, int c)
GST_DEBUG ("Pushing back one byte: 0x%x", c);
+ if (rid->position == 0)
+ return rid->position;
+
rid->position -= 1;
- if (rid->position < 0)
- rid->position = 0;
return rid->position;
}