[vlc-commits] spatialaudio: remove pause hack
Thomas Guillem
git at videolan.org
Mon Mar 30 11:15:53 CEST 2020
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Mar 25 14:14:55 2020 +0100| [986711c1d535fd2bf727bee6c6f0865080b9f9c2] | committer: Thomas Guillem
spatialaudio: remove pause hack
This is not needed anymore since the PTS is the input one, and not the clock
fixed one.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=986711c1d535fd2bf727bee6c6f0865080b9f9c2
---
modules/audio_filter/channel_mixer/spatialaudio.cpp | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/modules/audio_filter/channel_mixer/spatialaudio.cpp b/modules/audio_filter/channel_mixer/spatialaudio.cpp
index 755f1422d5..acb9ed0b75 100644
--- a/modules/audio_filter/channel_mixer/spatialaudio.cpp
+++ b/modules/audio_filter/channel_mixer/spatialaudio.cpp
@@ -88,7 +88,6 @@ struct filter_spatialaudio
filter_spatialaudio()
: speakers(NULL)
, i_inputPTS(0)
- , i_last_input_pts(0)
, inBuf(NULL)
, outBuf(NULL)
{}
@@ -123,7 +122,6 @@ struct filter_spatialaudio
std::vector<float> inputSamples;
vlc_tick_t i_inputPTS;
- vlc_tick_t i_last_input_pts;
unsigned i_order;
unsigned i_nondiegetic;
unsigned i_lr_channels; // number of physical left/right channel pairs
@@ -168,13 +166,6 @@ static block_t *Mix( filter_t *p_filter, block_t *p_buf )
{
filter_spatialaudio *p_sys = reinterpret_cast<filter_spatialaudio *>(p_filter->p_sys);
- /* Detect discontinuity due to a pause */
- static const vlc_tick_t rounding_error = 10;
- if( p_sys->i_inputPTS != 0
- && p_buf->i_pts - p_sys->i_last_input_pts > rounding_error )
- Flush( p_filter );
- p_sys->i_last_input_pts = p_buf->i_pts + p_buf->i_length;
-
const size_t i_prevSize = p_sys->inputSamples.size();
p_sys->inputSamples.resize(i_prevSize + p_buf->i_nb_samples * p_sys->i_inputNb);
memcpy((char*)(p_sys->inputSamples.data() + i_prevSize), (char*)p_buf->p_buffer, p_buf->i_buffer);
@@ -281,7 +272,7 @@ static void Flush( filter_t *p_filter )
{
filter_spatialaudio *p_sys = reinterpret_cast<filter_spatialaudio *>(p_filter->p_sys);
p_sys->inputSamples.clear();
- p_sys->i_last_input_pts = p_sys->i_inputPTS = 0;
+ p_sys->i_inputPTS = 0;
}
static void ChangeViewpoint( filter_t *p_filter, const vlc_viewpoint_t *p_vp)
More information about the vlc-commits
mailing list