[vlc-commits] aout: fix viewpoint init state

Thomas Guillem git at videolan.org
Tue Jul 25 16:42:45 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jul 25 09:38:20 2017 +0200| [aa9b11102fe5637e7faf68e3dc588b8f6ac01be4] | committer: Thomas Guillem

aout: fix viewpoint init state

Send previous viewpoint to new aout stream session.

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

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

diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 4e71a0904c..11aa7b6ce0 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -112,7 +112,7 @@ error:
 
     atomic_init (&owner->buffers_lost, 0);
     atomic_init (&owner->buffers_played, 0);
-    atomic_init (&owner->vp.update, false);
+    atomic_store (&owner->vp.update, true);
     return 0;
 }
 
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index a2fe2b39c0..d79a61b2da 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -209,6 +209,8 @@ audio_output_t *aout_New (vlc_object_t *parent)
     vlc_mutex_init (&owner->req.lock);
     vlc_mutex_init (&owner->dev.lock);
     vlc_mutex_init (&owner->vp.lock);
+    vlc_viewpoint_init (&owner->vp.value);
+    atomic_init (&owner->vp.update, false);
     owner->req.device = (char *)unset_str;
     owner->req.volume = -1.f;
     owner->req.mute = -1;
@@ -310,7 +312,7 @@ audio_output_t *aout_New (vlc_object_t *parent)
     text.psz_string = _("Audio filters");
     var_Change (aout, "audio-filter", VLC_VAR_SETTEXT, &text, NULL);
 
-    var_Create (aout, "viewpoint", VLC_VAR_ADDRESS  | VLC_VAR_DOINHERIT);
+    var_Create (aout, "viewpoint", VLC_VAR_ADDRESS );
     var_AddCallback (aout, "viewpoint", ViewpointCallback, NULL);
 
     var_Create (aout, "audio-visual", VLC_VAR_STRING | VLC_VAR_DOINHERIT);



More information about the vlc-commits mailing list