diff options
author | Alexander Wichers <development@wichers.nu> | 2008-10-18 12:08:55 +0000 |
---|---|---|
committer | Benjamin Larsson <banan@ludd.ltu.se> | 2008-10-18 12:08:55 +0000 |
commit | 88cb61bb0cf2efe2f2015ae4da76f941920d009a (patch) | |
tree | 8dac1e2864a887fff2168d03f196669025b7db56 | |
parent | bf9067cf3eba497d450b46d075dde93a90675539 (diff) | |
download | ffmpeg-88cb61bb0cf2efe2f2015ae4da76f941920d009a.tar.gz |
8HZ -> 8KHZ, cosmetics patch by Alexander Wichers development at wichersdot nu
Originally committed as revision 15632 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/flv.h | 16 | ||||
-rw-r--r-- | libavformat/flvdec.c | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/libavformat/flv.h b/libavformat/flv.h index efa8cebe8a..89d0d10ffe 100644 --- a/libavformat/flv.h +++ b/libavformat/flv.h @@ -71,14 +71,14 @@ enum { }; enum { - FLV_CODECID_PCM = 0, - FLV_CODECID_ADPCM = 1 << FLV_AUDIO_CODECID_OFFSET, - FLV_CODECID_MP3 = 2 << FLV_AUDIO_CODECID_OFFSET, - FLV_CODECID_PCM_LE = 3 << FLV_AUDIO_CODECID_OFFSET, - FLV_CODECID_NELLYMOSER_8HZ_MONO = 5 << FLV_AUDIO_CODECID_OFFSET, - FLV_CODECID_NELLYMOSER = 6 << FLV_AUDIO_CODECID_OFFSET, - FLV_CODECID_AAC = 10<< FLV_AUDIO_CODECID_OFFSET, - FLV_CODECID_SPEEX = 11<< FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_PCM = 0, + FLV_CODECID_ADPCM = 1 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_MP3 = 2 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_PCM_LE = 3 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_NELLYMOSER_8KHZ_MONO = 5 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_NELLYMOSER = 6 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_AAC = 10<< FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_SPEEX = 11<< FLV_AUDIO_CODECID_OFFSET, }; enum { diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index e548fb4a85..58861bb234 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -55,7 +55,7 @@ static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, int flv_c case FLV_CODECID_ADPCM: acodec->codec_id = CODEC_ID_ADPCM_SWF; break; case FLV_CODECID_SPEEX: acodec->codec_id = CODEC_ID_SPEEX; break; case FLV_CODECID_MP3 : acodec->codec_id = CODEC_ID_MP3 ; astream->need_parsing = AVSTREAM_PARSE_FULL; break; - case FLV_CODECID_NELLYMOSER_8HZ_MONO: + case FLV_CODECID_NELLYMOSER_8KHZ_MONO: acodec->sample_rate = 8000; //in case metadata does not otherwise declare samplerate case FLV_CODECID_NELLYMOSER: acodec->codec_id = CODEC_ID_NELLYMOSER; @@ -384,7 +384,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_8HZ_MONO) + 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); |