summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/pcm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index c9ae292c4b..245afdea4e 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -209,14 +209,14 @@ static int pcm_encode_frame(AVCodecContext *avctx,
case CODEC_ID_PCM_S8:
for(;n>0;n--) {
v = *samples++;
- dst[0] = (v + 128) >> 8;
+ dst[0] = v >> 8;
dst++;
}
break;
case CODEC_ID_PCM_U8:
for(;n>0;n--) {
v = *samples++;
- dst[0] = ((v + 128) >> 8) + 128;
+ dst[0] = (v >> 8) + 128;
dst++;
}
break;