[vlc-devel] [PATCH V2 3/8] aout: remove owner arguments

Thomas Guillem thomas at gllm.fr
Mon Oct 7 15:46:21 CEST 2019


---
 src/audio_output/aout_internal.h | 3 +--
 src/audio_output/dec.c           | 4 ++--
 src/audio_output/output.c        | 6 +++---
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 12fa4dfad9..95a33af6f0 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -117,8 +117,7 @@ audio_output_t *aout_New (vlc_object_t *);
 #define aout_New(a) aout_New(VLC_OBJECT(a))
 void aout_Destroy (audio_output_t *);
 
-int aout_OutputNew(audio_output_t *, audio_sample_format_t *,
-                   aout_filters_cfg_t *filters_cfg);
+int aout_OutputNew(audio_output_t *);
 void aout_OutputDelete( audio_output_t * p_aout );
 
 
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 34365411b5..e67321c2e7 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -96,7 +96,7 @@ int aout_DecNew(audio_output_t *p_aout, const audio_sample_format_t *p_format,
     owner->sync.clock = clock;
 
     owner->filters_cfg = AOUT_FILTERS_CFG_INIT;
-    if (aout_OutputNew (p_aout, &owner->mixer_format, &owner->filters_cfg))
+    if (aout_OutputNew (p_aout))
         goto error;
     aout_volume_SetFormat (owner->volume, owner->mixer_format.i_format);
 
@@ -162,7 +162,7 @@ static int aout_CheckReady (audio_output_t *aout)
                 aout_OutputDelete (aout);
             owner->mixer_format = owner->input_format;
             owner->filters_cfg = AOUT_FILTERS_CFG_INIT;
-            if (aout_OutputNew (aout, &owner->mixer_format, &owner->filters_cfg))
+            if (aout_OutputNew (aout))
                 owner->mixer_format.i_format = 0;
             aout_volume_SetFormat (owner->volume,
                                    owner->mixer_format.i_format);
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 5c378dbb31..327b6268ce 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -517,13 +517,13 @@ static void aout_PrepareStereoMode (audio_output_t *aout,
 
 /**
  * Starts an audio output stream.
- * \param fmt audio output stream format [IN/OUT]
  * \warning The caller must NOT hold the audio output lock.
  */
-int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt,
-                    aout_filters_cfg_t *filters_cfg)
+int aout_OutputNew (audio_output_t *aout)
 {
     aout_owner_t *owner = aout_owner (aout);
+    audio_sample_format_t *fmt = &owner->mixer_format;
+    aout_filters_cfg_t *filters_cfg = &owner->filters_cfg;
 
     audio_channel_type_t input_chan_type = fmt->channel_type;
     unsigned i_nb_input_channels = fmt->i_channels;
-- 
2.20.1



More information about the vlc-devel mailing list