Commit cc20e03f authored by kabi's avatar kabi

* always set extradata_size


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1129 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent f6f4f52b
...@@ -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, size; int id, bps;
id = get_le16(pb); id = get_le16(pb);
codec->codec_type = CODEC_TYPE_AUDIO; codec->codec_type = CODEC_TYPE_AUDIO;
...@@ -119,11 +119,10 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, ...@@ -119,11 +119,10 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec,
bps = get_le16(pb); /* bits per sample */ bps = get_le16(pb); /* bits per sample */
codec->codec_id = wav_codec_get_id(id, bps); codec->codec_id = wav_codec_get_id(id, bps);
if (has_extra_data) { if (has_extra_data) {
size = get_le16(pb); codec->extradata_size = get_le16(pb);
if (size > 0) { if (codec->extradata_size > 0) {
codec->extradata = av_mallocz(size); codec->extradata = av_mallocz(codec->extradata_size);
get_buffer(pb, codec->extradata, size); get_buffer(pb, codec->extradata, codec->extradata_size);
codec->extradata_size = size;
} }
} }
} }
......
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