Commit 87c351e5 authored by Laurent Aimar's avatar Laurent Aimar

Fixed timestamps handling in various audio filters.

parent 8c826f39
......@@ -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 )
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment