Commit dc63ceb4 authored by banan's avatar banan

Correctly handle FLV_CODECID_NELLYMOSER_8HZ_MONO files

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11284 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7a12c910
......@@ -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;
}
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment