summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-03-12 18:45:50 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-03-12 18:45:50 +0000
commite0ece99ab93a321c124f6c102fc3dc2c432fcd70 (patch)
tree4b4d34e0d486a1021fbb726ab32f5e9bc282eafc
parentcf2818b0e751ea4993e83632f56db0733b574ab6 (diff)
sorry forgot
Originally committed as revision 1671 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/wav.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libavformat/wav.c b/libavformat/wav.c
index 81301122d5..f8dd6c442e 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -115,7 +115,6 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size)
int id;
id = get_le16(pb);
- codec->codec_id = wav_codec_get_id(id, codec->frame_bits);
codec->codec_type = CODEC_TYPE_AUDIO;
codec->codec_tag = id;
codec->channels = get_le16(pb);
@@ -124,10 +123,10 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size)
codec->block_align = get_le16(pb);
if (size == 14) { /* We're dealing with plain vanilla WAVEFORMAT */
codec->bits_per_sample = 8;
- return;
- }
-
- codec->bits_per_sample = get_le16(pb);
+ }else
+ codec->bits_per_sample = get_le16(pb);
+ codec->codec_id = wav_codec_get_id(id, codec->bits_per_sample);
+
if (size > 16) { /* We're obviously dealing with WAVEFORMATEX */
codec->extradata_size = get_le16(pb);
if (codec->extradata_size > 0) {