changeset 87:b43e201588dc libavformat

sorry forgot
author michaelni
date Wed, 12 Mar 2003 18:45:50 +0000
parents 66845d76f6a0
children 70160a717f1b
files wav.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/wav.c	Wed Mar 12 17:14:28 2003 +0000
+++ b/wav.c	Wed Mar 12 18:45:50 2003 +0000
@@ -115,7 +115,6 @@
     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 @@
     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) {