You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-09-16 08:36:51 +02:00
avconv: Reformat s16 volume adjustment.
This commit is contained in:
13
avconv.c
13
avconv.c
@@ -1676,13 +1676,12 @@ static int output_packet(InputStream *ist, int ist_index,
|
|||||||
}
|
}
|
||||||
case AV_SAMPLE_FMT_S16:
|
case AV_SAMPLE_FMT_S16:
|
||||||
{
|
{
|
||||||
short *volp;
|
int16_t *volp = samples;
|
||||||
volp = samples;
|
for (i = 0; i < (decoded_data_size / sizeof(*volp)); 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;
|
*volp++ = av_clip_int16(v);
|
||||||
*volp++ = av_clip_int16(v);
|
}
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case AV_SAMPLE_FMT_S32:
|
case AV_SAMPLE_FMT_S32:
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user