OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc8c505
)
avconv: use av_clip_int16 for audio clipping
author
Alex Converse
<alex.converse@gmail.com>
Mon, 22 Aug 2011 17:38:35 +0000
(10:38 -0700)
committer
Alex Converse
<alex.converse@gmail.com>
Tue, 23 Aug 2011 16:53:23 +0000
(09:53 -0700)
avconv.c
patch
|
blob
|
history
diff --git
a/avconv.c
b/avconv.c
index
a86fa02
..
efb9b12
100644
(file)
--- 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);
}
}
}