Browse Source

riff: fix remuxing of atrac3 in wav

The original codec expects 0 as bps or refuses to play the remuxed file.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Piotr Bandurski Michael Niedermayer 13 years ago
parent
commit
0bb37bbc0f
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      libavformat/riff.c

+ 5
- 1
libavformat/riff.c View File

@@ -462,7 +462,11 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
}
avio_wl16(pb, enc->channels);
avio_wl32(pb, enc->sample_rate);
if (enc->codec_id == AV_CODEC_ID_MP2 || enc->codec_id == AV_CODEC_ID_MP3 || enc->codec_id == AV_CODEC_ID_GSM_MS || enc->codec_id == AV_CODEC_ID_G723_1) {
if (enc->codec_id == CODEC_ID_ATRAC3 ||
enc->codec_id == CODEC_ID_G723_1 ||
enc->codec_id == CODEC_ID_GSM_MS ||
enc->codec_id == CODEC_ID_MP2 ||
enc->codec_id == CODEC_ID_MP3) {
bps = 0;
} else {
if (!(bps = av_get_bits_per_sample(enc->codec_id))) {


Loading…
Cancel
Save