[DVDnav-discuss] [PATCH] Patch 2/5: EXTFINFO and Filetype 250

Jorgen Lundman lundman at lundman.net
Sun Sep 27 01:49:59 CEST 2009


> Could you resend the whole UDF patchset rediffed (if necessary) against
> current SVN? Nico, please review it when you have some time. I seem to
> remember that at least one patch was already OK'd by Nico.
>

I am dealing directly with Hovland to re-attempt my patches. I have sent him the 
first one to fix the AD chains. If that is accepted, I will do the 2nd one.

Lund

-- 
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)


Attached is patch "dvdread_patch_udf_file.txt".

The problem:

dvdread currently assumes that "file" in UDF have a starting block, and a 
length. The data is then contiguous from "start" until the final block.

In reality, UDF is split up into "AD chains" of contiguous segments, generally 
in increasing order.

UDF File:              dvdread file
  chain 0 start          file start
        |                    |
  chain 0 end                |
        |                    |
       gap                   |
        |                    |
  chain 1 start              |
        |                    |
  chain 1 end            file end
        |


This means that dvdread will incorrectly send the "gap blocks", as well as reach 
the "end" of the file sooner than it should. (Since gap blocks are counted).

This patch removes the view that a UDF file is start "starting block, and 
length", and creates a new "udf_file_t" structure to hold the number of AD 
chains, the AD chains and a few useful bits of information.

A new function has been written to convert the wanted block number inside the 
UDF file. Previously it was always "start_block + offset_block". Now it scans 
the AD chain for the chain in which "offset_block" is contained, and returns the 
correct RAW block offset from that AD chain's starting block.

UDF AD chains do not HAVE to be in incrementing order either, and you will find 
that some ARCcoS DVDs have the chains backwards. This patch will also fix this 
situation.

This patch mostly changes dvd_udf.c internally, with changes to dvd_reader.c to 
use the new udf_file_t instead of "lbnum". The patch should be transparent to 
software using dvdread. (Apart from no longer receiving GAP blocks, and 
receiving the full end blocks of VOBs larger than 1 AD chain).

This patch is required to allow larger files in UDF format, as the number of AD 
chains increases with filesize. For example, a 4GB file will use 5 AD chains.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dvdread_patch_udf_file.txt
URL: <http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/attachments/20090927/60a9b9fa/attachment-0001.txt>


More information about the DVDnav-discuss mailing list