Skip to content

Trying to play cdda-track after disc eject results in excessive tries to read

If one adds a CD-resource, such as cdda:///dev/sr0, to the playlist with a CD at this device it will, as expected, start playing.

Though, if you then stop the playlist, ejects the CD, and and try to play a track again VLC does not recognize that the device's resource is gone and will keep on trying to read sectors (which will continue to fail given that the underlying resource is gone).

= Os = Linux 4.6.4-1-ARCH [#1](https://code.videolan.org/videolan/vlc/-/issues/1) SMP PREEMPT x86_64 GNU/Linux
= VLC = VLC media player 3.0.0-git Vetinari (revision 2.2.0-git-8366-gf0c6d31)

Notes

  • Given that VLC does identify that the CD is not there if the device is later re-opened, the same functionality (error-check) should be present on the code-path that leads to the open of one specific track.

  • I cannot, at the current time, test to see if this bug exists on other platforms.



See the below for how to reproduce the issue.

Terminal #​1

$ vlc-trunk -Irc
VLC media player 3.0.0-git Vetinari (revision 2.2.0-git-8366-gf0c6d31)
[0000000001dbb228] [cli] lua interface: Listening on host "*console".
VLC media player 3.0.0-git Vetinari
Command Line Interface initialized. Type `help' for help.
> add cdda:///dev/sr0
> info
+----[ Stream 0 ]
|
| Type: Audio
| Codec: PCM S16 LE (s16l)
| Bits per sample: 16
| Channels: Stereo
| Sample rate: 44100 Hz
|
+----[ end of stream info ]
> stop
> playlist
+----[ Playlist - Undefined ]
| 2 - Playlist
|   5 - Garden Of Earthly Delights (00:05:07) [played 1 time]
|   6 - The Mayor Of Simpleton (00:04:00)
|   7 - King For A Day (00:03:42)
|   8 - Here Comes President Kill Again (00:03:36)
|   9 - The Loving (00:04:18)
|   10 - Poor Skeleton Steps Out (00:03:28)
|   11 - One Of The Millions (00:04:38)
|   12 - Scarecrow People (00:04:14)
|   13 - Merely A Man (00:03:28)
|   14 - Cynical Days (00:03:20)
|   15 - Across This Antheap (00:04:52)
|   16 - Hold Me My Daddy (00:03:52)
|   17 - Pink Thing (00:03:56)
|   18 - Miniature Sun (00:04:08)
|   19 - Chalkhills and Children (00:05:08)
| 3 - Media Library
+----[ End of playlist ]

Terminal #​2

$ eject /dev/sr0

Terminal #​1

> play 1
[00007f4010002ca8] cdda stream error: could not read block 0 from disc
[00007f4010002ca8] cdda stream error: cannot read sector 0
[00007f4010002ca8] cdda stream error: could not read block 1 from disc
[00007f4010002ca8] cdda stream error: cannot read sector 1
[00007f4010002ca8] cdda stream error: could not read block 2 from disc
[00007f4010002ca8] cdda stream error: cannot read sector 2
[00007f4010002ca8] cdda stream error: could not read block 3 from disc
[00007f4010002ca8] cdda stream error: cannot read sector 3
[00007f4010002ca8] cdda stream error: could not read block 4 from disc
[00007f4010002ca8] cdda stream error: cannot read sector 4
[00007f4010002ca8] cdda stream error: could not read block 5 from disc
[00007f4010002ca8] cdda stream error: cannot read sector 5
[00007f4010002ca8] cdda stream error: could not read block 6 from disc
[00007f4010002ca8] cdda stream error: cannot read sector 6
[00007f4010002ca8] cdda stream error: could not read block 7 from disc
[00007f4010002ca8] cdda stream error: cannot read sector 7
[00007f4010002ca8] cdda stream error: could not read block 8 from disc
[00007f4010002ca8] cdda stream error: cannot read sector 8
[00007f4010002ca8] cdda stream error: could not read block 9 from disc
[00007f4010002ca8] cdda stream error: cannot read sector 9
[00007f4010002ca8] cdda stream error: could not read block 10 from disc
[00007f4010002ca8] cdda stream error: cannot read sector 10
[00007f4010002ca8] cdda stream error: could not read block 11 from disc
[00007f4010002ca8] cdda stream error: cannot read sector 11
...
> stop
> add cdda:///dev/sr0
[00007f36b8006508] cdda stream error: could not read TOCHDR
[00007f36b8006508] cdda stream error: no audio tracks found
[00007f36b800c378] core input source error: cannot access cdda:///dev/sr0

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information