[FFmpeg-devel] [PATCH] Seeking to beginning of avi file skips first audio packet

John Stebbins stebbins
Mon May 17 01:31:07 CEST 2010

When seeking to the beginning of an avi file with av_seek_frame,
avi_read_seek seeks to the correct position for stream index 0, then
seeks to the next interleaved packet for all other streams.  When
seeking to the beginning of the file, this causes packets for other
streams to be skipped if these streams start earlier in the file than
stream 0.

This patch changes the logic only when a backward seek is requested. It
picks the previous interleaved packet for each stream instead of the
next, then doing url_fseek to the minimum position of the previous
packets found for each stream.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: A05-avi-seek.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100516/7b9c9ddb/attachment.txt>

More information about the ffmpeg-devel mailing list