From 7b76c22465b3973b2bfc1669f2605d196500f095 Mon Sep 17 00:00:00 2001 From: Benjamin Larsson Date: Thu, 20 Dec 2007 11:21:10 +0000 Subject: [PATCH] Correctly handle FLV_CODECID_NELLYMOSER_8HZ_MONO files Originally committed as revision 11284 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/flvdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 885c4a6fe5..b253b954b2 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -179,6 +179,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst } else if(!strcmp(key, "audiosamplerate") && acodec && num_val >= 0) { //some tools, like FLVTool2, write consistently approximate metadata sample rates + if (!acodec->sample_rate) { switch((int)num_val) { case 44000: acodec->sample_rate = 44100 ; break; case 22000: acodec->sample_rate = 22050 ; break; @@ -186,6 +187,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst case 5000 : acodec->sample_rate = 5512 ; break; default : acodec->sample_rate = num_val; } + } } } }