[DVDnav-discuss] [PATCH] Patch 1: struct AD -> struct FileAD

Jorgen Lundman lundman at lundman.net
Fri Oct 10 09:15:24 CEST 2008


Attached patch for removing the hacky overload of "struct AD" which is 
also used for File operations, resulting in 64-bit to 32-bit conversions 
and more.

Additionally, libdvdread assumed all blocks fit inside one AD chain, in 
contiguous order, which is generally true for all DVDs. (Since files are 
limited to 1GB in size). I have extended this to correctly handle the 
UDF AD chaining as the ECMA_167 specifications detail.

All 32-bit filesize references have been changed to 64-bit.

UDFFindFile() no longer return a "block number" but a reference to a 
"UDF_FILE". This should be freed by calling UDFFileFree(). All calls 
from dvd_reader.c have been updated.

An additional function UDFFileBlockPos() has added to translate between 
a file's block offset, into correct disk block. (Walking the AD chains 
to find correct block, as well as, File start block and partition block 
number).

Tested only against title_info.c since I need all patches for complete 
testing.


-- 
Jorgen Lundman       | <lundman at lundman.net>
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo    | +81 (0)90-5578-8500          (cell)
Japan                | +81 (0)3 -3375-1767          (home)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libdvdread_patch1.txt
URL: <http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/attachments/20081010/1b8a3bd7/attachment.txt>


More information about the DVDnav-discuss mailing list