anchor.diff:    if not FileExists(aFilename) then
       Exit;
   
  -  AVIFileOpenW(fAVI.AFile, PChar(aFilename), OF_READ, nil);
  -  AVIFileGetStream(fAVI.AFile, fAVI.Stream_Video, streamtypeVIDEO, 0);
  -  AVIFileGetStream(fAVI.AFile, fAVI.Stream_Audio, streamtypeAUDIO, 0);
  -  AVIStreamInfoA(fAVI.Stream_Video, @StreamInfo_Video, SizeOf(TAVISTREAMINFO));
  +  AVIFileOpenW(fAVI.AVIFile, PChar(aFilename), OF_READ, nil);
  +  AVIFileGetStream(fAVI.AVIFile, fAVI.StreamVideo, streamtypeVIDEO, 0);
  +  AVIFileGetStream(fAVI.AVIFile, fAVI.StreamAudio, streamtypeAUDIO, 0);
  +  AVIStreamInfoA(fAVI.StreamVideo, @StreamInfo_Video, SizeOf(TAVISTREAMINFO));
   
     fFPS := 1 / (StreamInfo_Video.dwRate / StreamInfo_Video.dwScale);
     fFrameCount := StreamInfo_Video.dwLength;
   
  -  if Assigned(fAVI.Stream_Audio) then
  +  if Assigned(fAVI.StreamAudio) then
     begin
       WFSize := SizeOf(TPCMWaveFormat);
       GetMem(WF, WFSize);
  -    AVIStreamReadFormat(fAVI.Stream_Audio, 0, WF, @WFSize);
  -
  -    AVIStreamRead(fAVI.Stream_Audio, 0, AVIStreamTimeToSample(fAVI.Stream_Audio, AVIStreamEndTime(fAVI.Stream_Audio)),
  +    AVIStreamReadFormat(fAVI.StreamAudio, 0, WF, @WFSize);
  +
  +    AVIStreamRead(fAVI.StreamAudio, 0, AVIStreamTimeToSample(fAVI.StreamAudio, AVIStreamEndTime(fAVI.StreamAudio)),
         nil, 0, @BufferSize, nil);
       GetMem(Buffer, BufferSize);
       ZeroMemory(Buffer, BufferSize);
  -    AVIStreamRead(fAVI.Stream_Audio, 0, AVIStreamTimeToSample(fAVI.Stream_Audio, AVIStreamEndTime(fAVI.Stream_Audio)),
  +    AVIStreamRead(fAVI.StreamAudio, 0, AVIStreamTimeToSample(fAVI.StreamAudio, AVIStreamEndTime(fAVI.StreamAudio)),
         Buffer, BufferSize, nil, nil);
   
       case WF.WF.nChannels of
  
positive.code: 
    TAVIState = (aviNoFile, aviStopped, aviPlaying, aviPaused);
  
    TAVI_Video = record
      AFile: PAVIFile;
      Stream_Video, Stream_Audio: PAVIStream;
      Frame: PGETFRAME;
    end;
  
  
negative.code:   fBMP.Free;
  
    AVIStreamGetFrameClose(fAVI.Frame);
    AVIStreamRelease(fAVI.StreamVideo);
    AVIStreamRelease(fAVI.StreamAudio);
    AVIFileRelease(fAVI.AVIFile);
    ZeroMemory(@fAVI, SizeOf(TAVIVideo));
  
    if Assigned(fSound) then
    begin
  