mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-31 08:57:49 +00:00
use av_clip_int16() where it makes sense
Originally committed as revision 10078 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
160ab30fcc
commit
aee481cebe
14 changed files with 34 additions and 64 deletions
|
@ -307,8 +307,7 @@ static inline int conv(int samples, float **pcm, char *buf, int channels) {
|
|||
|
||||
val = mono[j] * 32767.f;
|
||||
|
||||
if(val > 32767) val = 32767 ;
|
||||
if(val < -32768) val = -32768 ;
|
||||
val = av_clip_int16(val);
|
||||
|
||||
*ptr = val ;
|
||||
ptr += channels;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue