[vlc-commits] aout: fix out-of-place viewpoint code
Rémi Denis-Courmont
git at videolan.org
Fri May 4 15:50:51 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri May 4 16:32:20 2018 +0300| [a8d367160711de349ef2b046a7f452ea0f9d1de6] | committer: Rémi Denis-Courmont
aout: fix out-of-place viewpoint code
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a8d367160711de349ef2b046a7f452ea0f9d1de6
---
src/audio_output/aout_internal.h | 3 ---
src/audio_output/dec.c | 11 -----------
src/audio_output/output.c | 13 +++++++++++++
3 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 563c775168..2aad079b45 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -183,7 +183,4 @@ static inline void aout_SetWavePhysicalChannels(audio_sample_format_t *fmt)
/* From filters.c */
bool aout_FiltersCanResample (aout_filters_t *filters);
-void aout_ChangeViewpoint(audio_output_t *aout,
- const vlc_viewpoint_t *p_viewpoint);
-
#endif /* !LIBVLC_AOUT_INTERNAL_H */
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 363dc62afc..1659a314d5 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -463,14 +463,3 @@ void aout_DecFlush (audio_output_t *aout, bool wait)
aout_OutputFlush (aout, wait);
}
}
-
-void aout_ChangeViewpoint(audio_output_t *aout,
- const vlc_viewpoint_t *p_viewpoint)
-{
- aout_owner_t *owner = aout_owner (aout);
-
- vlc_mutex_lock (&owner->vp.lock);
- owner->vp.value = *p_viewpoint;
- atomic_store(&owner->vp.update, true);
- vlc_mutex_unlock (&owner->vp.lock);
-}
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 4e6194e6e5..c077631a2b 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -195,6 +195,8 @@ static int StereoModeCallback (vlc_object_t *obj, const char *varname,
return 0;
}
+static void aout_ChangeViewpoint(audio_output_t *, const vlc_viewpoint_t *);
+
static int ViewpointCallback (vlc_object_t *obj, const char *var,
vlc_value_t prev, vlc_value_t cur, void *data)
{
@@ -920,3 +922,14 @@ error:
free(tabid);
return -1;
}
+
+static void aout_ChangeViewpoint(audio_output_t *aout,
+ const vlc_viewpoint_t *p_viewpoint)
+{
+ aout_owner_t *owner = aout_owner(aout);
+
+ vlc_mutex_lock(&owner->vp.lock);
+ owner->vp.value = *p_viewpoint;
+ atomic_store(&owner->vp.update, true);
+ vlc_mutex_unlock(&owner->vp.lock);
+}
More information about the vlc-commits
mailing list