From 79d1ec9129498260ceb410c54d6e95531f7c1d41 Mon Sep 17 00:00:00 2001 From: Måns Rullgård Date: Fri, 16 Jun 2006 20:45:29 +0000 Subject: 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 --- libavformat/wav.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/wav.c') diff --git a/libavformat/wav.c b/libavformat/wav.c index 0f04456445..2b215c4b2b 100644 --- a/libavformat/wav.c +++ b/libavformat/wav.c @@ -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; -- cgit v1.2.3