bin/55546: cdcontrol play tr m:s.f interface is partially broken
Anthony Wood
adwood at earthlink.net
Wed Aug 13 07:50:09 PDT 2003
>Number: 55546
>Category: bin
>Synopsis: cdcontrol play tr m:s.f interface is partially broken
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Aug 13 07:50:07 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Anthony Wood
>Release: FreeBSD 4.8-STABLE i386
>Organization:
>Environment:
System: FreeBSD lichen.forest.org 4.8-STABLE FreeBSD 4.8-STABLE #0: Fri Jul 18 18:31:24 EDT 2003 root at user56.net688.va.sprint-hsd.net:/usr/obj/usr/src/sys/LICHEN i386
Standard 4-STABLE system.
>Description:
The 'play tr m:s.f ...' interface is broken, such that cdcontrol
sometimes rejects a minute:second offset improperly, saying that
'Track x is not that long.' Other times, when it should reject
the request (eg, 'play 12 35:0'), an Input/Output error occurs
instead.
>How-To-Repeat:
[Note: 5.x has a fix for a separate (track - 1) problem that is
necessary to reproduce in exactly the way shown here.]
cdcontrol> info
Starting track = 1, ending track = 19, TOC size = 162 bytes
track start duration block length type
-------------------------------------------------
1 0:02.00 3:17.18 0 14793 audio
2 3:19.18 3:54.25 14793 17575 audio
3 7:13.43 2:43.55 32368 12280 audio
4 9:57.23 3:40.45 44648 16545 audio
5 13:37.68 2:03.74 61193 9299 audio
6 15:41.67 3:06.58 70492 14008 audio
7 18:48.50 2:25.66 84500 10941 audio
8 21:14.41 3:09.23 95441 14198 audio
9 24:23.64 6:36.19 109639 29719 audio
10 31:00.08 4:56.49 139358 22249 audio
11 35:56.57 4:48.60 161607 21660 audio
12 40:45.42 2:43.60 183267 12285 audio
[...]
cdcontrol> play 1 0:30
Track 1 is not that long.
cdcontrol> play 11 30:00
cdcontrol: Input/output error
>Fix:
The bug is in function play(), at label Play_Relative_Addresses,
where the msf.(minute|second|frame) fields taken out of toc_buffer[]
are treated as if they were the duration of each track, when in
fact they are the cumulative *start* of each track. To convert to
duration, which is needed to range check the 'play track m:s.f'
command, something like happens in prtrack() needs to happen.
That is, pull the msf for this and the next track, convert both
to lba, subtract, and convert back to msf.
This is probably an easy bug to fix, except for the 13 different
invocation varieties allowed.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list