This website works better with JavaScript.
Home
Help
Sign In
falkTX
/
FFmpeg
mirror of
https://github.com/falkTX/FFmpeg.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
338
Wiki
Activity
Browse Source
fixing overflow in 16->8 bit conversion, patch by (Nikolai Zhubr <s001 at hotbox dot ru>)
Originally committed as revision 913 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Nikolai Zhubr
Michael Niedermayer
23 years ago
parent
b2a0a7fb8a
commit
0eaec10550
1 changed files
with
2 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-2
libavcodec/pcm.c
+ 2
- 2
libavcodec/pcm.c
View File
@@ -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;
Write
Preview
Loading…
Cancel
Save