mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Workaround for av_resample_compensate ffmpeg bug.
FFmpeg commit a67cb012e6947fb238193afc0f18114f6e20818c or 1b9ca38d9d06d319fffd61d27e4eb385d6572ba8 breaks av_resample_compensate. Only big sample_delta compensation_distance ratios are now working.
This commit is contained in:
parent
181a0bb372
commit
d6c6818ecf
5
codec.c
5
codec.c
@ -931,7 +931,12 @@ static void CodecAudioSetClock(AudioDecoder * audio_decoder, int64_t pts)
|
|||||||
if (audio_decoder->AvResample && audio_decoder->DriftCorr) {
|
if (audio_decoder->AvResample && audio_decoder->DriftCorr) {
|
||||||
int distance;
|
int distance;
|
||||||
|
|
||||||
|
// try workaround for buggy ffmpeg 0.10
|
||||||
|
if (audio_decoder->DriftCorr < 2000) {
|
||||||
|
distance = (pts_diff * audio_decoder->HwSampleRate) / (900 * 1000);
|
||||||
|
} else {
|
||||||
distance = (pts_diff * audio_decoder->HwSampleRate) / (90 * 1000);
|
distance = (pts_diff * audio_decoder->HwSampleRate) / (90 * 1000);
|
||||||
|
}
|
||||||
av_resample_compensate(audio_decoder->AvResample,
|
av_resample_compensate(audio_decoder->AvResample,
|
||||||
audio_decoder->DriftCorr / 10, distance);
|
audio_decoder->DriftCorr / 10, distance);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user