You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avconv: use av_clip_int16 for audio clipping
This commit is contained in:
4
avconv.c
4
avconv.c
@@ -1638,9 +1638,7 @@ static int output_packet(InputStream *ist, int ist_index,
|
|||||||
volp = samples;
|
volp = samples;
|
||||||
for(i=0;i<(decoded_data_size / sizeof(short));i++) {
|
for(i=0;i<(decoded_data_size / sizeof(short));i++) {
|
||||||
int v = ((*volp) * audio_volume + 128) >> 8;
|
int v = ((*volp) * audio_volume + 128) >> 8;
|
||||||
if (v < -32768) v = -32768;
|
*volp++ = av_clip_int16(v);
|
||||||
if (v > 32767) v = 32767;
|
|
||||||
*volp++ = v;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user