[vlc-commits] aout: lack of software mixer is non fatal

Rémi Denis-Courmont git at videolan.org
Mon Aug 8 17:33:22 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug  8 18:02:18 2011 +0300| [7c7f4ce0357a13dbf3c2eebdc3c78f2c06a8c278] | committer: Rémi Denis-Courmont

aout: lack of software mixer is non fatal

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7c7f4ce0357a13dbf3c2eebdc3c78f2c06a8c278
---

 src/audio_output/dec.c   |   11 -----------
 src/audio_output/mixer.c |    4 ++--
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index d22807d..f60fa4d 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -103,11 +103,6 @@ int aout_DecNew( audio_output_t *p_aout,
 
     assert (owner->volume.mixer == NULL);
     owner->volume.mixer = aout_MixerNew (p_aout, owner->mixer_format.i_format);
-    if (owner->volume.mixer == NULL)
-    {
-        aout_OutputDelete( p_aout );
-        goto error;
-    }
 
     date_Init (&owner->sync.date, owner->mixer_format.i_rate, 1);
     date_Set (&owner->sync.date, VLC_TS_INVALID);
@@ -168,17 +163,11 @@ static void aout_CheckRestart (audio_output_t *aout)
 
     if (aout_OutputNew (aout, &input->input))
     {
-error:
         input->b_error = true;
         return; /* we are officially screwed */
     }
 
     owner->volume.mixer = aout_MixerNew (aout, owner->mixer_format.i_format);
-    if (owner->volume.mixer == NULL)
-    {
-        aout_OutputDelete (aout);
-        goto error;
-    }
 
     if (aout_InputNew (aout, input, &input->request_vout))
         assert (input->b_error);
diff --git a/src/audio_output/mixer.c b/src/audio_output/mixer.c
index b1a8b5d..1c1cfa3 100644
--- a/src/audio_output/mixer.c
+++ b/src/audio_output/mixer.c
@@ -51,7 +51,6 @@ audio_mixer_t *aout_MixerNew(vlc_object_t *obj, vlc_fourcc_t format)
     mixer->module = module_need(mixer, "audio mixer", NULL, false);
     if (mixer->module == NULL)
     {
-        msg_Err(mixer, "no suitable audio mixer");
         vlc_object_release(mixer);
         mixer = NULL;
     }
@@ -75,5 +74,6 @@ void aout_MixerDelete(audio_mixer_t *mixer)
  */
 void aout_MixerRun(audio_mixer_t *mixer, block_t *block, float amp)
 {
-    mixer->mix(mixer, block, amp);
+    if (mixer != NULL)
+        mixer->mix(mixer, block, amp);
 }



More information about the vlc-commits mailing list