diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-10-25 03:06:03 +0400 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-10-25 03:06:03 +0400 |
commit | 7f8cd075e0f6a83c2d55cffaa5545776602125fd (patch) | |
tree | 906750d0040acba6a606f03c344cdf1daef9a3cf /libavformat/flvdec.c | |
parent | 1848f7d9f9a36f4bcde12a765bcc0a871cf1b942 (diff) |
simplify sample rate code, flv_set_audio_codec already overrides it for nellymoser 8khz
Originally committed as revision 15687 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r-- | libavformat/flvdec.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index b51c72ee14..08008836fa 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -388,10 +388,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) if(is_audio){ if(!st->codec->sample_rate || !st->codec->bits_per_coded_sample || (!st->codec->codec_id && !st->codec->codec_tag)) { st->codec->channels = (flags & FLV_AUDIO_CHANNEL_MASK) == FLV_STEREO ? 2 : 1; - if((flags & FLV_AUDIO_CODECID_MASK) == FLV_CODECID_NELLYMOSER_8KHZ_MONO) - st->codec->sample_rate= 8000; - else - st->codec->sample_rate = (44100 << ((flags & FLV_AUDIO_SAMPLERATE_MASK) >> FLV_AUDIO_SAMPLERATE_OFFSET) >> 3); + st->codec->sample_rate = (44100 << ((flags & FLV_AUDIO_SAMPLERATE_MASK) >> FLV_AUDIO_SAMPLERATE_OFFSET) >> 3); st->codec->bits_per_coded_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8; flv_set_audio_codec(s, st, flags & FLV_AUDIO_CODECID_MASK); } |