diff options
author | Johns <johns98@gmx.net> | 2012-03-05 20:38:43 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2012-03-05 20:38:43 +0100 |
commit | d6c6818ecfe2930494b2339515b7a25c1678f639 (patch) | |
tree | ef452e3ad31b1704d6774e8e3759f38d55fdad1a /codec.c | |
parent | 181a0bb3720f615b9ef68235df4f50f396c31869 (diff) | |
download | vdr-plugin-softhddevice-d6c6818ecfe2930494b2339515b7a25c1678f639.tar.gz vdr-plugin-softhddevice-d6c6818ecfe2930494b2339515b7a25c1678f639.tar.bz2 |
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.
Diffstat (limited to 'codec.c')
-rw-r--r-- | codec.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -931,7 +931,12 @@ static void CodecAudioSetClock(AudioDecoder * audio_decoder, int64_t pts) if (audio_decoder->AvResample && audio_decoder->DriftCorr) { int distance; - distance = (pts_diff * audio_decoder->HwSampleRate) / (90 * 1000); + // 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); + } av_resample_compensate(audio_decoder->AvResample, audio_decoder->DriftCorr / 10, distance); } |