aboutsummaryrefslogtreecommitdiffstats
path: root/avconv.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2011-08-22 10:38:35 -0700
committerAlex Converse <alex.converse@gmail.com>2011-08-23 09:53:23 -0700
commit6c7ee2f7db5e07e65182c89608e191f861c499ed (patch)
treeac00f43498086dc5cd6dce10f829be4cc8fe7317 /avconv.c
parentbc8c50512fc8550ae80535390379e00937623e00 (diff)
downloadffmpeg-6c7ee2f7db5e07e65182c89608e191f861c499ed.tar.gz
avconv: use av_clip_int16 for audio clipping
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/avconv.c b/avconv.c
index a86fa02eb7..efb9b12a32 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1638,9 +1638,7 @@ static int output_packet(InputStream *ist, int ist_index,
volp = samples;
for(i=0;i<(decoded_data_size / sizeof(short));i++) {
int v = ((*volp) * audio_volume + 128) >> 8;
- if (v < -32768) v = -32768;
- if (v > 32767) v = 32767;
- *volp++ = v;
+ *volp++ = av_clip_int16(v);
}
}
}