From 4b6841057980d041ca807193f2562546280a58b6 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 15 Oct 2003 15:21:46 +0000 Subject: [PATCH] 10l Originally committed as revision 2387 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/nut.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavformat/nut.c b/libavformat/nut.c index 8a8c3d5bd3..4a0d9418de 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -251,13 +251,20 @@ static int nut_write_header(AVFormatContext *s) { int tmp = codec_get_bmp_tag(codec->codec_id); put_bi(bc, tmp); - nom = codec->frame_rate; - denom = codec->frame_rate_base; } else if (codec->codec_type == CODEC_TYPE_AUDIO) { int tmp = codec_get_wav_tag(codec->codec_id); put_bi(bc, tmp); + } + + if (codec->codec_type == CODEC_TYPE_VIDEO) + { + nom = codec->frame_rate; + denom = codec->frame_rate_base; + } + else + { nom = codec->sample_rate/8; denom = 8; }