Browse Source

ffmpeg: use av_clip_int16 for audio clipping

tags/n0.9
Alex Converse Michael Niedermayer 14 years ago
parent
commit
08fe874fa4
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      ffmpeg.c

+ 1
- 3
ffmpeg.c View File

@@ -1703,9 +1703,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);
}
}
}


Loading…
Cancel
Save