[DVDnav-discuss] [PATCH] Guarantee forward seek attempt moves position forward

John Stebbins stebbins at jetheaddev.com
Sat Sep 12 23:01:58 CEST 2009


libdvdnav has a problem in that it is difficult to gracefully recover 
from a read error and continue on to subsequent blocks on the disc.  An 
application would like to seek forward past the current block after 
getting a read error in order to attempt to get past the bad block(s). 
But dvdnav_sector_search() does not guarantee that a requested forward 
seek will actually move the current position forward.  It truncates down 
to the nearest VOBU which will almost always cause a forward seek 
request by a single block (or a small number of blocks) to move the 
current position backward.  This behaviour puts the application into a 
loop of: read failure, attempted forward seek (which results in backward 
seek), read failure ...

Attached is a patch to dvdnav_sector_search which guarantees that an 
attempted forward seek always moves the current position forward.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: A05-forward-seek.patch
URL: <http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/attachments/20090912/888fa015/attachment.txt>


More information about the DVDnav-discuss mailing list