diff options
author | wm4 <wm4@nowhere> | 2013-01-06 19:28:08 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-01-06 19:28:08 +0100 |
commit | 9b3bf76d27c9cd87685aee4cb6652ef7071237b3 (patch) | |
tree | d4855cf4d61ba86b1f4ebab3f746c66f70b9c299 /sub/subreader.h | |
parent | 67ee79283b5e3f1fb9e0bdad96922b0bd431b365 (diff) | |
download | mpv-9b3bf76d27c9cd87685aee4cb6652ef7071237b3.tar.bz2 mpv-9b3bf76d27c9cd87685aee4cb6652ef7071237b3.tar.xz |
ao_alsa: do not call snd_pcm_delay() when paused
This causes trouble when a hw device is used:
pcm_hw.c:514:(snd_pcm_hw_delay) SNDRV_PCM_IOCTL_DELAY failed (-77): File descriptor in bad state
when running mpv test.mkv --ao=alsa:device=iec958,alsa and pausing
during playback.
Historically, mplayer usually did not call snd_pcm_delay() (which is
called by get_delay()) while paused, so this problem never showed up.
But at least mpv has changes that cause get_delay() to be called when
updating the status line (see commit 3f949cf).
It's possible that calling snd_pcm_delay() is not always legal when the
audio is paused, and at least fails with the error message mentioned
above is the device is a hardware device. Change get_delay() to return
the last delay before the audio was paused. The intention is to get a
continuous playback status display, even when pausing or frame stepping,
otherwise we could just return the audio buffer fill status in
get_delay() or even just 0 when paused.
Diffstat (limited to 'sub/subreader.h')
0 files changed, 0 insertions, 0 deletions