mirror of https://git.ffmpeg.org/ffmpeg.git
Correctly handle FLV_CODECID_NELLYMOSER_8HZ_MONO files
Originally committed as revision 11284 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
5efaf00029
commit
7b76c22465
|
@ -179,6 +179,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
|
||||||
}
|
}
|
||||||
else if(!strcmp(key, "audiosamplerate") && acodec && num_val >= 0) {
|
else if(!strcmp(key, "audiosamplerate") && acodec && num_val >= 0) {
|
||||||
//some tools, like FLVTool2, write consistently approximate metadata sample rates
|
//some tools, like FLVTool2, write consistently approximate metadata sample rates
|
||||||
|
if (!acodec->sample_rate) {
|
||||||
switch((int)num_val) {
|
switch((int)num_val) {
|
||||||
case 44000: acodec->sample_rate = 44100 ; break;
|
case 44000: acodec->sample_rate = 44100 ; break;
|
||||||
case 22000: acodec->sample_rate = 22050 ; break;
|
case 22000: acodec->sample_rate = 22050 ; break;
|
||||||
|
@ -189,6 +190,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue