Package: dvdbackup Version: 0.4.1-1 Severity: important Tags: patch Hi,
when dvdbackup encounters read errors while copying vob files, it prints a message to stderr mentioning the file name of the affected vob. However, this file name is wrong for all except the first vob in a title set. I noticed this because I copied the same disk using dvdbackup -M and also using cp -r (the dvd is not css encrypted) to compare results, and both told me they had one vob file affected by read errors, but not the same one. After that, I copied the same disk using a different drive on a different machine, which went through without read errors because this drive is better/newer, and I compared all three results using md5sum. It became evident that the vob file for which dvdbackup told it had read errors was intact, because it was identical in all three cases, and that in reality the vob file for which cp told it had read errors was affected, because all three versions where different. This happens because dvdbackup.c:DVDCopyTitleVobX reads the source dvd using an abstract api using only title ids and no file names, and therefore needs to reconstruct a file name when printing error messages. It includes the correct title set id in the fake file name, but sets the vob number always to zero, which is only correct for the first vob in a title set. DVDCopyTitleVobX already has the correct vob number and uses it to construct the the correct target vob file name, and therefore its trivial to use the same number to create a correct file name for the error message. My attached patch does exactly this. Greetings, Kolja Nowak. -- System Information: Debian Release: 5.0.4 APT prefers stable APT policy: (990, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.30-bpo.2-686 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages dvdbackup depends on: ii libc6 2.7-18lenny4 GNU C Library: Shared libraries ii libdvdread4 4.1.3-9 library for reading DVDs dvdbackup recommends no packages. Versions of packages dvdbackup suggests: ii libdvdcss2 1.2.10-0.2 Simple foundation for reading DVDs -- no debconf information
diff -Naur dvdbackup-0.4.1/src/dvdbackup.c dvdbackup-0.4.1_patch/src/dvdbackup.c --- dvdbackup-0.4.1/src/dvdbackup.c 2009-06-09 00:25:29.000000000 +0200 +++ dvdbackup-0.4.1_patch/src/dvdbackup.c 2010-06-11 18:23:13.224031430 +0200 @@ -912,9 +912,9 @@ /* Return value */ int result; - /* create filename VIDEO_TS.VOB or VTS_XX_0.VOB */ + /* create filename VIDEO_TS.VOB or VTS_XX_X.VOB */ if(title_set > 0) { - sprintf(filename, "VTS_%02i_0.VOB", title_set); + sprintf(filename, "VTS_%02i_%d.VOB", title_set, vob); } if (title_set_info->number_of_title_sets + 1 < title_set) {