Fix DVDDiscID from reading non-existent IFO files
authorSteve Dibb <steve.dibb@gmail.com>
Mon, 17 Feb 2014 00:14:04 +0000 (00:14 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 18 Feb 2014 15:39:52 +0000 (16:39 +0100)
commitc820067e14e097fb6a4fee0929bea2937d7cb473
tree61f9a5cdc52597d07480507b4f1d7b4a3d3488af
parenta2f211a6143d6db857a2cbcd10019f8a40fc1eb3
Fix DVDDiscID from reading non-existent IFO files

In dvd_reader.c, the DVDDiscID function gets the MD5 from the total contents
of the IFO files on the disc.  However, it gets it by looping through the
the first ten IFO files, whether they exist or not.

This results in spewage, where a disc has less than ten.  In this case,
Dragonheart only has two:

libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_03_0.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_04_0.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_05_0.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_06_0.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_07_0.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_08_0.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_09_0.IFO failed

Instead of using a set limit of 10 IFOs, this patch counts the number of
VTSes existing on the DVD, and will use that number instead if it is less
than 10.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/dvd_reader.c