riff: fix remuxing of G723_1 in wav

Attached patch fixes remuxing of G723.1 in wav, so the output is playable by WMP.
(It's still not enough for encoding - probably some extradata should be added to the output file
to make it playable by WMP/win codec)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/28/head
Piotr Bandurski 12 years ago committed by Michael Niedermayer
parent 01272e7662
commit b9c129be0f
  1. 2
      libavformat/riff.c

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

Loading…
Cancel
Save