Bug 74375

Summary: [PATCH] sysutils/dvdbackup cannot get DVD-title
Product: Ports & Packages Reporter: Zahemszky@, Gábor <gabor>
Component: Individual Port(s)Assignee: Michael Johnson <ahze>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Zahemszky@, Gábor 2004-11-25 16:30:28 UTC
With sysutils/dvdbackup, I cannot read the DVD-title.  Neither with a SCSI
DVD-ROM (Pioneer DVD 305S), nor an ATAPI DVD-ROM (Samsung/Toshiba TS-H552B
- I tried both with /dev/acd0 device, and with ATAPICAM as /dev/cd1). As
libdvdcss can read the DVD-title (as we can found in the ~/.dvdcss
"cache directory"), the problem is with dvdbackup.

Fix: By reading libdvdcss source, and dvdbackup source, the only difference is
that libdvdcss reads one 2048 bytes sector at a time.  But dvdbackup
tries to read eg. 32 bytes in one read.  So the obvious fix is to change
dvdbackup's title-reading to read the whole sector in a temporary buffer,
and after it, copy the DVD-title from this temporary buffer to the correct
location.  This is in the DVDGetTitleName routine

By the way, this patch makes two another corrections:

a) add the missing -n option into the help (it's in the README file, and in
the source, but dvdrecord doesn't write it) - in the "usage" routine

b) corrects some typos. - in the same "usage", and in DVDDisplayInfo

=== patch-dvdbackup.c
How-To-Repeat: Try running:
dvdbackup -i /dev/dvd -I
and looking the output.  (Or try to make a backup with
dvdbackup -i /dev/dvd -M -o savedir
and read the error message.)
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2004-11-26 15:12:59 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ahze

Letter for you, Michael.
Comment 2 Michael Johnson freebsd_committer freebsd_triage 2004-12-09 22:34:06 UTC
State Changed
From-To: open->feedback

Can you please send me a unified diff?
Comment 3 Michael Johnson freebsd_committer freebsd_triage 2004-12-11 22:18:40 UTC
State Changed
From-To: feedback->closed

Committed, Thanks