avformat/riffenc: move MP3 LSF threshold to the midway point between the 2

No testcase available but this seems more correct

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/94/head
Michael Niedermayer 10 years ago
parent d5999b7f28
commit 8afaa03c53
  1. 2
      libavformat/riffenc.c

@ -105,7 +105,7 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc, int flags)
if (enc->codec_id == AV_CODEC_ID_MP2) { if (enc->codec_id == AV_CODEC_ID_MP2) {
blkalign = frame_size; blkalign = frame_size;
} else if (enc->codec_id == AV_CODEC_ID_MP3) { } else if (enc->codec_id == AV_CODEC_ID_MP3) {
blkalign = 576 * (enc->sample_rate <= 24000 ? 1 : 2); blkalign = 576 * (enc->sample_rate <= (24000 + 32000)/2 ? 1 : 2);
} else if (enc->codec_id == AV_CODEC_ID_AC3) { } else if (enc->codec_id == AV_CODEC_ID_AC3) {
blkalign = 3840; /* maximum bytes per frame */ blkalign = 3840; /* maximum bytes per frame */
} else if (enc->codec_id == AV_CODEC_ID_AAC) { } else if (enc->codec_id == AV_CODEC_ID_AAC) {

Loading…
Cancel
Save