[FFmpeg-cvslog] r15687 - trunk/libavformat/flvdec.c
bcoudurier
subversion
Sat Oct 25 01:06:03 CEST 2008
Author: bcoudurier
Date: Sat Oct 25 01:06:03 2008
New Revision: 15687
Log:
simplify sample rate code, flv_set_audio_codec already overrides it for nellymoser 8khz
Modified:
trunk/libavformat/flvdec.c
Modified: trunk/libavformat/flvdec.c
==============================================================================
--- trunk/libavformat/flvdec.c (original)
+++ trunk/libavformat/flvdec.c Sat Oct 25 01:06:03 2008
@@ -388,10 +388,7 @@ static int flv_read_packet(AVFormatConte
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);
}
More information about the ffmpeg-cvslog
mailing list