stupidest coder on earth (#2)

Originally committed to SVN as r338.
This commit is contained in:
David Lamparter 2006-04-14 23:25:10 +00:00
parent ef40189a2b
commit c21a6dd1d9
1 changed files with 4 additions and 1 deletions

View File

@ -145,8 +145,11 @@ void LAVCAudioProvider::GetAudio(void *buf, __int64 start, __int64 count)
samples = audio_resample(rsct, _buf, buffer, samples);
assert(samples <= _count);
} else
} else {
if (samples > _count)
samples = _count;
memcpy(_buf, buffer, samples << 1);
}
_buf += samples;
_count -= samples;