[vlc-devel] [PATCH v2 2/7] alsa: setup known callbacks from Open()

Thomas Guillem thomas at gllm.fr
Wed Mar 13 09:55:50 CET 2019


---
 modules/audio_output/alsa.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index 08067c1338..e507f78241 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -611,8 +611,6 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
     fmt->channel_type = AUDIO_CHANNEL_TYPE_BITMAP;
     sys->format = fmt->i_format;
 
-    aout->time_get = TimeGet;
-    aout->play = Play;
     if (snd_pcm_hw_params_can_pause (hw))
         aout->pause = Pause;
     else
@@ -620,7 +618,6 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
         aout->pause = PauseDummy;
         msg_Warn (aout, "device cannot be paused");
     }
-    aout->flush = Flush;
     aout_SoftVolumeStart (aout);
     return 0;
 
@@ -851,6 +848,10 @@ static int Open(vlc_object_t *obj)
         free (ids);
     }
 
+    aout->time_get = TimeGet;
+    aout->play = Play;
+    aout->flush = Flush;
+
     return VLC_SUCCESS;
 error:
     free (sys);
-- 
2.20.1



More information about the vlc-devel mailing list