Browse Source

avdevice/alsa: wait until playback buffers are drained before closing

This fixes early abort on ALSA playback

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.4
Takayuki 'January June' Suwa Michael Niedermayer 8 years ago
parent
commit
ea93b74074
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavdevice/alsa.c

+ 2
- 0
libavdevice/alsa.c View File

@@ -300,6 +300,8 @@ av_cold int ff_alsa_close(AVFormatContext *s1)
{
AlsaData *s = s1->priv_data;

snd_pcm_nonblock(s->h, 0);
snd_pcm_drain(s->h);
av_freep(&s->reorder_buf);
if (CONFIG_ALSA_INDEV)
ff_timefilter_destroy(s->timefilter);


Loading…
Cancel
Save