avifile: Fix playback of fixed sample size audio streams.

This commit is contained in:
Maarten Lankhorst 2010-01-20 01:08:31 +01:00 committed by Alexandre Julliard
parent 7f8ccf0342
commit bfe9e6d74c
1 changed files with 9 additions and 0 deletions

View File

@ -1087,6 +1087,15 @@ static HRESULT WINAPI IAVIStream_fnRead(IAVIStream *iface, LONG start,
LONG block = start;
LONG offset = 0;
if (!buffer)
{
if (bytesread)
*bytesread = samples*This->sInfo.dwSampleSize;
if (samplesread)
*samplesread = samples;
return AVIERR_OK;
}
/* convert start sample to block,offset pair */
AVIFILE_SamplesToBlock(This, &block, &offset);