Commit f93a3263 authored by kabi's avatar kabi

* cleanup statics & const

* using frame_bits to store bits_per_sample
 (to be able to recontruct exactly wav header)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1187 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 513253b9
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "avformat.h" #include "avformat.h"
#include "avi.h" #include "avi.h"
CodecTag codec_wav_tags[] = { const CodecTag codec_wav_tags[] = {
{ CODEC_ID_MP2, 0x50 }, { CODEC_ID_MP2, 0x50 },
{ CODEC_ID_MP3LAME, 0x55 }, { CODEC_ID_MP3LAME, 0x55 },
{ CODEC_ID_AC3, 0x2000 }, { CODEC_ID_AC3, 0x2000 },
...@@ -106,7 +106,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc) ...@@ -106,7 +106,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, void get_wav_header(ByteIOContext *pb, AVCodecContext *codec,
int has_extra_data) int has_extra_data)
{ {
int id, bps; int id;
id = get_le16(pb); id = get_le16(pb);
codec->codec_type = CODEC_TYPE_AUDIO; codec->codec_type = CODEC_TYPE_AUDIO;
...@@ -116,8 +116,8 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, ...@@ -116,8 +116,8 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec,
codec->sample_rate = get_le32(pb); codec->sample_rate = get_le32(pb);
codec->bit_rate = get_le32(pb) * 8; codec->bit_rate = get_le32(pb) * 8;
codec->block_align = get_le16(pb); codec->block_align = get_le16(pb);
bps = get_le16(pb); /* bits per sample */ codec->frame_bits = get_le16(pb); /* bits per sample */
codec->codec_id = wav_codec_get_id(id, bps); codec->codec_id = wav_codec_get_id(id, codec->frame_bits);
if (has_extra_data) { if (has_extra_data) {
codec->extradata_size = get_le16(pb); codec->extradata_size = get_le16(pb);
if (codec->extradata_size > 0) { if (codec->extradata_size > 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment