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