1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Takayuki 'January June' Suwa 2017-05-06 20:42:56 +09:00 committed by Michael Niedermayer
parent 8a8335de03
commit ea93b74074

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);