[FFmpeg-cvslog] shorten: use av_clip_int16() for output sample clipping

Justin Ruggles git at videolan.org
Fri Oct 21 02:37:09 CEST 2011


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Fri Sep 16 17:51:40 2011 -0400| [bd7f7d6c7813ccf4ef1daaa7b01463f31fe7a7d4] | committer: Justin Ruggles

shorten: use av_clip_int16() for output sample clipping

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd7f7d6c7813ccf4ef1daaa7b01463f31fe7a7d4
---

 libavcodec/shorten.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 5ffd634..ec50fc1 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -254,7 +254,7 @@ static int16_t * interleave_buffer(int16_t *samples, int nchan, int blocksize, i
     int i, chan;
     for (i=0; i<blocksize; i++)
         for (chan=0; chan < nchan; chan++)
-            *samples++ = FFMIN(buffer[chan][i], 32768);
+            *samples++ = av_clip_int16(buffer[chan][i]);
     return samples;
 }
 



More information about the ffmpeg-cvslog mailing list