Return a more common sample rate is nothing is set in the matroska file.
This commit is contained in:
1 parent
e8e0db5da1
commit
1125e84048
2 files changed
+4
-2
No files matched your search
@@ -499,6 +499,10 @@ static NSString * TrackNameToString(TrackInfo *track)
|
||||
if (sampleRate < 24000)
|
||||
return 48000;
|
||||
}
|
||||
// Sample rate is not set, so just guess one.
|
||||
if (sampleRate == 0) {
|
||||
return 48000;
|
||||
}
|
||||
|
||||
return mkv_TruncFloat(trackInfo->AV.Audio.SamplingFreq);
|
||||
}
|
||||
|
||||
@@ -1265,8 +1265,6 @@ static void parseAudioInfo(MatroskaFile *mf,ulonglong toplen,struct TrackInfo *t
|
||||
|
||||
if (ti->AV.Audio.Channels == 0)
|
||||
ti->AV.Audio.Channels = 1;
|
||||
if (mkv_TruncFloat(ti->AV.Audio.SamplingFreq) == 0)
|
||||
ti->AV.Audio.SamplingFreq = mkfi(8000);
|
||||
if (mkv_TruncFloat(ti->AV.Audio.OutputSamplingFreq)==0)
|
||||
ti->AV.Audio.OutputSamplingFreq = ti->AV.Audio.SamplingFreq;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user