* is the number of significative bytes in it. */
size_t i_size, i_nb_bytes;
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;
struct aout_buffer_t * p_next;
mad_stream_errorstr( &p_sys->mad_stream ) );
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;
}
aout_filter.output.i_format = p_filter->fmt_out.i_codec;
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_samples = p_block->i_nb_samples;
out_buf.p_buffer = p_out->p_buffer;
p_buf->i_pts = date_Get( &p_sys->end_date );
p_buf->end_date =
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;
/* Hack for libmad filter */
p_buffer = malloc( sizeof(aout_buffer_t) );
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_buffer = p_block->p_buffer;
buffer->i_size = i_alloc_size;
buffer->p_buffer = (uint8_t *)buffer + sizeof(aout_buffer_t);
- buffer->b_discontinuity = false;
+ buffer->i_flags = 0;
return buffer;
}