Commit e9eb5d5e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

aout_buffer_t.b_disconuity -> aout_buffert.i_flags

parent 0c7e60bf
...@@ -133,7 +133,7 @@ struct aout_buffer_t ...@@ -133,7 +133,7 @@ struct aout_buffer_t
* is the number of significative bytes in it. */ * is the number of significative bytes in it. */
size_t i_size, i_nb_bytes; size_t i_size, i_nb_bytes;
unsigned int i_nb_samples; unsigned int i_nb_samples;
bool b_discontinuity; /* Set on discontinuity (for non pcm stream) */ uint32_t i_flags;
mtime_t i_pts, end_date; mtime_t i_pts, end_date;
struct aout_buffer_t * p_next; struct aout_buffer_t * p_next;
......
...@@ -141,7 +141,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -141,7 +141,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
mad_stream_errorstr( &p_sys->mad_stream ) ); mad_stream_errorstr( &p_sys->mad_stream ) );
p_sys->i_reject_count = 3; p_sys->i_reject_count = 3;
} }
else if( p_in_buf->b_discontinuity ) else if( p_in_buf->i_flags & BLOCK_FLAG_DISCONUITY )
{ {
p_sys->i_reject_count = 3; p_sys->i_reject_count = 3;
} }
...@@ -395,7 +395,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block ) ...@@ -395,7 +395,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
aout_filter.output.i_format = p_filter->fmt_out.i_codec; aout_filter.output.i_format = p_filter->fmt_out.i_codec;
in_buf.p_buffer = p_block->p_buffer; in_buf.p_buffer = p_block->p_buffer;
in_buf.b_discontinuity = false; in_buf.i_flags = 0;
in_buf.i_nb_bytes = p_block->i_buffer; in_buf.i_nb_bytes = p_block->i_buffer;
in_buf.i_nb_samples = p_block->i_nb_samples; in_buf.i_nb_samples = p_block->i_nb_samples;
out_buf.p_buffer = p_out->p_buffer; out_buf.p_buffer = p_out->p_buffer;
......
...@@ -541,7 +541,8 @@ static aout_buffer_t *GetAoutBuffer( decoder_t *p_dec ) ...@@ -541,7 +541,8 @@ static aout_buffer_t *GetAoutBuffer( decoder_t *p_dec )
p_buf->i_pts = date_Get( &p_sys->end_date ); p_buf->i_pts = date_Get( &p_sys->end_date );
p_buf->end_date = p_buf->end_date =
date_Increment( &p_sys->end_date, p_sys->i_frame_length ); date_Increment( &p_sys->end_date, p_sys->i_frame_length );
p_buf->b_discontinuity = p_sys->b_discontinuity; if( p_sys->b_discontinuity )
p_buf->i_flags |= BLOCK_FLAG_DISCONTINUITY;
p_sys->b_discontinuity = false; p_sys->b_discontinuity = false;
/* Hack for libmad filter */ /* Hack for libmad filter */
......
...@@ -1368,7 +1368,7 @@ static aout_buffer_t *audio_new_buffer( decoder_t *p_dec, int i_samples ) ...@@ -1368,7 +1368,7 @@ static aout_buffer_t *audio_new_buffer( decoder_t *p_dec, int i_samples )
p_buffer = malloc( sizeof(aout_buffer_t) ); p_buffer = malloc( sizeof(aout_buffer_t) );
if( !p_buffer ) return NULL; if( !p_buffer ) return NULL;
p_buffer->b_discontinuity = false; p_buffer->i_flags = 0;
p_buffer->p_sys = p_block = block_New( p_dec, i_size ); p_buffer->p_sys = p_block = block_New( p_dec, i_size );
p_buffer->p_buffer = p_block->p_buffer; p_buffer->p_buffer = p_block->p_buffer;
......
...@@ -719,6 +719,6 @@ aout_buffer_t *aout_BufferAlloc(aout_alloc_t *allocation, mtime_t microseconds, ...@@ -719,6 +719,6 @@ aout_buffer_t *aout_BufferAlloc(aout_alloc_t *allocation, mtime_t microseconds,
buffer->i_size = i_alloc_size; buffer->i_size = i_alloc_size;
buffer->p_buffer = (uint8_t *)buffer + sizeof(aout_buffer_t); buffer->p_buffer = (uint8_t *)buffer + sizeof(aout_buffer_t);
buffer->b_discontinuity = false; buffer->i_flags = 0;
return buffer; return buffer;
} }
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