# HG changeset patch # User banan # Date 1224331735 0 # Node ID 41f9a32e9516617883d6375dc6fc40f471e5a424 # Parent fcff303d5c8c8614b8181db4576b9052f3b12cb9 8HZ -> 8KHZ, cosmetics patch by Alexander Wichers development at wichersdot nu diff -r fcff303d5c8c -r 41f9a32e9516 flv.h --- a/flv.h Sat Oct 18 10:40:31 2008 +0000 +++ b/flv.h Sat Oct 18 12:08:55 2008 +0000 @@ -71,14 +71,14 @@ }; 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 -r fcff303d5c8c -r 41f9a32e9516 flvdec.c --- a/flvdec.c Sat Oct 18 10:40:31 2008 +0000 +++ b/flvdec.c Sat Oct 18 12:08:55 2008 +0000 @@ -55,7 +55,7 @@ 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 @@ 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);