[vlc-commits] commit: Fixed timestamps handling in various audio filters. (Laurent Aimar )
git at videolan.org
git at videolan.org
Mon Jul 26 20:30:43 CEST 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Jul 26 20:29:57 2010 +0200| [87c351e58ad9f47e75ed8c165df229655075466d] | committer: Laurent Aimar
Fixed timestamps handling in various audio filters.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=87c351e58ad9f47e75ed8c165df229655075466d
---
modules/audio_filter/channel_mixer/dolby.c | 4 ++++
modules/audio_filter/channel_mixer/trivial.c | 3 +++
modules/audio_filter/converter/fixed.c | 2 ++
modules/audio_filter/resampler/bandlimited.c | 1 +
modules/audio_filter/scaletempo.c | 1 +
5 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/modules/audio_filter/channel_mixer/dolby.c b/modules/audio_filter/channel_mixer/dolby.c
index adf3399..0319f03 100644
--- a/modules/audio_filter/channel_mixer/dolby.c
+++ b/modules/audio_filter/channel_mixer/dolby.c
@@ -177,6 +177,10 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
float * p_out = (float*) p_out_buf->p_buffer;
p_out_buf->i_nb_samples = i_nb_samples;
+ p_out_buf->i_dts = p_in_buf->i_dts;
+ p_out_buf->i_pts = p_in_buf->i_pts;
+ p_out_buf->i_length = p_in_buf->i_length;
+
memset( p_out, 0, p_out_buf->i_buffer );
if( p_sys->i_rear_left >= 0 )
diff --git a/modules/audio_filter/channel_mixer/trivial.c b/modules/audio_filter/channel_mixer/trivial.c
index b76aa90..9211751 100644
--- a/modules/audio_filter/channel_mixer/trivial.c
+++ b/modules/audio_filter/channel_mixer/trivial.c
@@ -115,6 +115,9 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
if( !p_out_buf )
goto out;
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
+ p_out_buf->i_dts = p_in_buf->i_dts;
+ p_out_buf->i_pts = p_in_buf->i_pts;
+ p_out_buf->i_length = p_in_buf->i_length;
}
int32_t * p_dest = (int32_t *)p_out_buf->p_buffer;
diff --git a/modules/audio_filter/converter/fixed.c b/modules/audio_filter/converter/fixed.c
index e0144b6..9a5b426 100644
--- a/modules/audio_filter/converter/fixed.c
+++ b/modules/audio_filter/converter/fixed.c
@@ -204,6 +204,7 @@ static block_t *Do_S16ToF32( filter_t * p_filter, block_t * p_in_buf )
p_in++; p_out++;
}
+ p_out_buf->i_dts = p_in_buf->i_dts;
p_out_buf->i_pts = p_in_buf->i_pts;
p_out_buf->i_length = p_in_buf->i_length;
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
@@ -233,6 +234,7 @@ static block_t *Do_U8ToF32( filter_t * p_filter, block_t * p_in_buf )
*p_out = (vlc_fixed_t)( (int32_t)(*p_in - 128) * (FIXED32_ONE / 128) );
p_in++; p_out++;
}
+ p_out_buf->i_dts = p_in_buf->i_dts;
p_out_buf->i_pts = p_in_buf->i_pts;
p_out_buf->i_length = p_in_buf->i_length;
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
diff --git a/modules/audio_filter/resampler/bandlimited.c b/modules/audio_filter/resampler/bandlimited.c
index a71aa8f..d0f447d 100644
--- a/modules/audio_filter/resampler/bandlimited.c
+++ b/modules/audio_filter/resampler/bandlimited.c
@@ -235,6 +235,7 @@ static block_t *Resample( filter_t * p_filter, block_t * p_in_buf )
/* Finalize aout buffer */
p_out_buf->i_nb_samples = i_out;
+ p_out_buf->i_dts =
p_out_buf->i_pts = date_Get( &p_sys->end_date );
p_out_buf->i_length = date_Increment( &p_sys->end_date,
p_out_buf->i_nb_samples ) - p_out_buf->i_pts;
diff --git a/modules/audio_filter/scaletempo.c b/modules/audio_filter/scaletempo.c
index d35fc1f..fa31eb9 100644
--- a/modules/audio_filter/scaletempo.c
+++ b/modules/audio_filter/scaletempo.c
@@ -495,6 +495,7 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
p_out_buf->i_buffer = bytes_out;
p_out_buf->i_nb_samples = bytes_out / p->bytes_per_frame;
+ p_out_buf->i_dts = p_in_buf->i_dts;
p_out_buf->i_pts = p_in_buf->i_pts;
p_out_buf->i_length = p_in_buf->i_length;
More information about the vlc-commits
mailing list