<p dir="ltr">Hello,</p>
<p dir="ltr">Le 22 sept. 2016 11:32, git@videolan.org a écrit :<br>
><br>
> vlc | branch: master | Thomas Guillem <thomas@gllm.fr> | Thu Sep 22 16:36:59 2016 +0200| [4bba1e84a13a8d340b8a06df155bec8034bcd012] | committer: Thomas Guillem<br>
><br>
> aout: always signal when the aout changed<br>
><br>
> In a previous patch, we signaled that the aout changed when it was restarted.</p>
<p dir="ltr">Because the decoder needs to handle it.</p>
<p dir="ltr">> We also need to signal that event when an aout module selects a device without<br>
> requesting a restart.</p>
<p dir="ltr">No? There is nothing for the decoder to do there.</p>
<p dir="ltr">> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4bba1e84a13a8d340b8a06df155bec8034bcd012<br>
> ---<br>
><br>
> src/audio_output/aout_internal.h | 1 +<br>
> src/audio_output/dec.c           | 6 ++++++<br>
> src/audio_output/output.c        | 1 +<br>
> 3 files changed, 8 insertions(+)<br>
><br>
> diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h<br>
> index c6edf8e..a0574fa 100644<br>
> --- a/src/audio_output/aout_internal.h<br>
> +++ b/src/audio_output/aout_internal.h<br>
> @@ -83,6 +83,7 @@ typedef struct<br>
>      atomic_uint buffers_lost;<br>
>      atomic_uint buffers_played;<br>
>      atomic_uchar restart;<br>
> +    bool device_changed;<br>
> } aout_owner_t;<br>
><br>
> typedef struct<br>
> diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c<br>
> index 1751e30..2f97848 100644<br>
> --- a/src/audio_output/dec.c<br>
> +++ b/src/audio_output/dec.c<br>
> @@ -83,6 +83,7 @@ int aout_DecNew( audio_output_t *p_aout,<br>
>      owner->input_format = *p_format;<br>
>      owner->mixer_format = owner->input_format;<br>
>      owner->request_vout = *p_request_vout;<br>
> +    owner->device_changed = false;<br>
><br>
>      if (aout_OutputNew (p_aout, &owner->mixer_format))<br>
>          goto error;<br>
> @@ -174,6 +175,11 @@ static int aout_CheckReady (audio_output_t *aout)<br>
>           * left over by an audio visualization:<br>
>          input_resource_TerminatVout(MAGIC HERE); */<br>
>      }<br>
> +    if (owner->device_changed)<br>
> +    {<br>
> +        owner->device_changed = false;<br>
> +        status = AOUT_DEC_CHANGED;<br>
> +    }<br>
>      return (owner->mixer_format.i_format) ? status : AOUT_DEC_FAILED;<br>
> }<br>
><br>
> diff --git a/src/audio_output/output.c b/src/audio_output/output.c<br>
> index 90db056..600705d 100644<br>
> --- a/src/audio_output/output.c<br>
> +++ b/src/audio_output/output.c<br>
> @@ -561,6 +561,7 @@ void aout_OutputUnlock (audio_output_t *aout)<br>
>          aout_OutputDeviceSet (aout, owner->req.device);<br>
>          free (owner->req.device);<br>
>          owner->req.device = (char *)unset_str;<br>
> +        owner->device_changed = true;<br>
>      }<br>
><br>
>      if (owner->req.volume >= 0.f)<br>
><br>
> _______________________________________________<br>
> vlc-commits mailing list<br>
> vlc-commits@videolan.org<br>
> https://mailman.videolan.org/listinfo/vlc-commits<br></p>