aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZdenek Kabelac <kabi@informatics.muni.cz>2002-11-11 09:09:06 +0000
committerZdenek Kabelac <kabi@informatics.muni.cz>2002-11-11 09:09:06 +0000
commite8c0008912fd1573fdda97988eb5f5e6e50a636a (patch)
tree294ad78cb1be3885b0bd067eff3b6cb2f773bf7e
parentc18a2692d2d1916ea9f2bb56803c4069b0213bc7 (diff)
downloadffmpeg-e8c0008912fd1573fdda97988eb5f5e6e50a636a.tar.gz
* cleanup statics & const
* using frame_bits to store bits_per_sample (to be able to recontruct exactly wav header) Originally committed as revision 1187 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libav/wav.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libav/wav.c b/libav/wav.c
index 672bd323f9..f6bcd7b0e5 100644
--- a/libav/wav.c
+++ b/libav/wav.c
@@ -19,7 +19,7 @@
#include "avformat.h"
#include "avi.h"
-CodecTag codec_wav_tags[] = {
+const CodecTag codec_wav_tags[] = {
{ CODEC_ID_MP2, 0x50 },
{ CODEC_ID_MP3LAME, 0x55 },
{ CODEC_ID_AC3, 0x2000 },
@@ -106,7 +106,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
void get_wav_header(ByteIOContext *pb, AVCodecContext *codec,
int has_extra_data)
{
- int id, bps;
+ int id;
id = get_le16(pb);
codec->codec_type = CODEC_TYPE_AUDIO;
@@ -116,8 +116,8 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec,
codec->sample_rate = get_le32(pb);
codec->bit_rate = get_le32(pb) * 8;
codec->block_align = get_le16(pb);
- bps = get_le16(pb); /* bits per sample */
- codec->codec_id = wav_codec_get_id(id, bps);
+ codec->frame_bits = get_le16(pb); /* bits per sample */
+ codec->codec_id = wav_codec_get_id(id, codec->frame_bits);
if (has_extra_data) {
codec->extradata_size = get_le16(pb);
if (codec->extradata_size > 0) {