1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

use standard codec tag if the specified tag is out of range and would be

truncated

Originally committed as revision 5488 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2006-06-16 20:45:29 +00:00
parent 4f8ff17e75
commit 79d1ec9129

View File

@ -60,7 +60,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
int bps, blkalign, bytespersec;
int hdrsize = 18;
if(!enc->codec_tag)
if(!enc->codec_tag || enc->codec_tag > 0xffff)
enc->codec_tag = codec_get_tag(codec_wav_tags, enc->codec_id);
if(!enc->codec_tag)
return -1;