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

libmpeg2: eliminate dead code and factor

parent 01c780ae
......@@ -386,7 +386,8 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
bool b_skip = false;
picture_t *p_pic;
if( !p_dec->b_pace_control && !p_sys->b_preroll &&
!(p_sys->b_slice_i
&& ((p_current->flags
......@@ -396,12 +397,8 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
& PIC_MASK_CODING_TYPE,
/*p_sys->p_vout->render_time*/ 0 /*FIXME*/,
p_info->sequence->flags & SEQ_FLAG_LOW_DELAY ) )
{
b_skip = true;
}
picture_t *p_pic = NULL;
if( !b_skip )
p_pic = NULL;
else
{
p_pic = DpbNewPicture( p_dec );
if( !p_pic )
......@@ -418,28 +415,15 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
}
}
if( b_skip || !p_pic )
{
mpeg2_skip( p_sys->p_mpeg2dec, 1 );
p_sys->b_skip = true;
mpeg2_skip( p_sys->p_mpeg2dec, p_pic == NULL );
p_sys->b_skip = p_pic == NULL;
if( p_pic != NULL )
decoder_SynchroDecode( p_sys->p_synchro );
else
decoder_SynchroTrash( p_sys->p_synchro );
PutPicture( p_dec, NULL );
PutPicture( p_dec, p_pic );
if( !b_skip )
{
block_Release( p_block );
return NULL;
}
}
else
{
mpeg2_skip( p_sys->p_mpeg2dec, 0 );
p_sys->b_skip = false;
decoder_SynchroDecode( p_sys->p_synchro );
PutPicture( p_dec, p_pic );
}
if( p_info->user_data_len > 2 || p_sys->i_gop_user_data > 2 )
{
p_sys->i_cc_pts = i_pts;
......
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