[vlc-devel] [PATCH] dvdnav cannot be trusted to open regular files (fix #4741)

Kaarlo Räihä kaarlo.raiha at gmail.com
Sun May 8 09:59:28 CEST 2011


2011/5/8 Juha Jeronen <juha.jeronen at jyu.fi>

> On 05/08/2011 01:24 AM, Jean-Baptiste Kempf wrote:
> > On Sat, May 07, 2011 at 08:23:54PM +0300, Juha Jeronen wrote :
> >> Alternative idea: require the user to open DVD image files as
> >> dvd:///path/to/file instead of file:///path/to/file. However, in this
> > This doesn't work if you open a .iso file.
>
> True, not from the regular file open dialog.
>
> However, the URI seems to work. It would need another dialog, which is
> not ideal.
>
> (I tested by choosing Media > Open Disc, typing in (or pasting) a path
> to an ISO file as the disc device, and hitting play. What gets saved in
> recent media by doing this is "dvd:///path/to/file.ISO".)
>
>
> >> (I think the feature of playing DVD images is semi-important for "plays
> >> almost anything". Not absolutely critical, but nice to have...)
> > Playing .iso of DVDs (and maybe soon BDs) is a quite important feature
> > of VLC and VLC is often praised on reviews for this capability.
>
> I see.
>
> It also makes filter testing much more convenient, but that's probably
> not of major importance for most users ;)
>
>
> About recognizing DVD ISO files, I did some testing. Judging by a small
> sample, they seem to have this in common:
>
> ---8<---8<---8<---
>
> 00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> |................|
> *
> 00008000  01 43 44 30 30 31 01 00  20 20 20 20 20 20 20 20
> |.CD001..        |
>
> ---8<---8<---8<---
>
> That is, 32768 (0x8000) bytes of zeroes, and then the sequence 01 43 44
> 30 30 31 01 00 (i.e. 0x01, "CD001", 0x01, 0x00).
>
> The "CD001" looks like a block identifier. At further offsets, I'm
> seeing blocks like "BEA01", "NSR02" and "TEA01" (Earl Grey? Hot?). Each
> identifier is exactly 5 ASCII-representable characters, enclosed as 0x01
> STRING 0x01 0x00. Some blocks seem to be terminated by 0xFF STRING 0x01
> 0x00 (with matching string).
>
> For the curious: the DVD LBA length is 2048 (dvdnav.h), so 32768
> corresponds to LBA 16. The first 16 logical blocks are blank...
>
> I think that if we want to detect DVD ISO files in ProbeDVD(), we could
> check for 0x0000 at the start of the file, and then 0x01 x x x x x 0x01
> 0x00 at offset 32768 (or LBA 16 to match the style of the existing
> code), and if these match, then check for the anchor. It's not perfect,
> but it should at least cut down on the amount of false positives.
>
> What about other disc image formats? Do we support them?
>

Bin+Cue support is in VLC, but some people have complained earlier that it
doesn't work correctly (mostly used for VCD and SVCD).


>
>  -J
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110508/34821b89/attachment.html>


More information about the vlc-devel mailing list