From a0ed84e38833aebe4b88e9609408a30ab249eaa6 Mon Sep 17 00:00:00 2001 From: David Lamparter <equinox@diac24.net> Date: Sat, 15 Apr 2006 00:21:15 +0000 Subject: [PATCH] lavc: load entire fire Originally committed to SVN as r342. --- core/audio_provider_lavc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/audio_provider_lavc.cpp b/core/audio_provider_lavc.cpp index f79d06c8d..d8b960713 100644 --- a/core/audio_provider_lavc.cpp +++ b/core/audio_provider_lavc.cpp @@ -145,8 +145,8 @@ void LAVCAudioProvider::GetAudio(void *buf, __int64 start, __int64 count) samples = bytesout >> 1; if (rsct) { - if ((__int64)(samples * resample_ratio) > _count) - samples = (__int64)(_count * resample_ratio); + if ((__int64)(samples * resample_ratio / codecContext->channels) > _count) + samples = (__int64)(_count / resample_ratio * codecContext->channels); samples = audio_resample(rsct, _buf, buffer, samples / codecContext->channels); assert(samples <= _count);