The AVIStreamPrevKeyFrameTime macro returns the time of the previous key frame in the stream, starting at a given time.
AVIStreamPrevKeyFrameTime(
  pavi, 
  time  
);
 Returns the time if successful or – 1 otherwise.
The search performed by this macro includes the frame that corresponds to the specified time.
The AVIStreamPrevKeyFrameTime macro is defined as follows:
#define AVIStreamPrevKeyFrameTime(pavi, time) \ 
    AVIStreamSampleToTime(pavi, AVIStreamPrevKeyFrame(pavi, 
    AVIStreamTimeToSample(pavi, time))) 
 
  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in vfw.h.
AVIFile Functions and Macros Overview, AVIFile Macros