+ {
+ uint8_t *buf[3];
+ buf[0] = buf[1] = buf[2] = NULL;
+
+ msg_Warn( p_dec, "invalid picture encountered" );
+ if ( ( p_sys->p_info->current_picture == NULL ) ||
+ ( ( p_sys->p_info->current_picture->flags &
+ PIC_MASK_CODING_TYPE) != B_CODING_TYPE ) )
+ {
+ if( p_sys->p_synchro ) vout_SynchroReset( p_sys->p_synchro );
+ }
+ mpeg2_skip( p_sys->p_mpeg2dec, 1 );
+ p_sys->b_skip = 1;
+
+ if( p_sys->p_info->current_fbuf &&
+ p_sys->p_info->current_fbuf->id )
+ {
+ p_sys->b_garbage_pic = 1;
+ p_pic = p_sys->p_info->current_fbuf->id;
+ }
+ else if( !p_sys->p_info->sequence )
+ {
+ break;
+ }
+ else
+ {
+ if( (p_pic = GetNewPicture( p_dec, buf )) == NULL )
+ break;
+ mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
+ }
+ p_sys->p_picture_to_destroy = p_pic;
+
+ memset( p_pic->p[0].p_pixels, 0,
+ p_sys->p_info->sequence->width
+ * p_sys->p_info->sequence->height );
+ memset( p_pic->p[1].p_pixels, 0x80,
+ p_sys->p_info->sequence->width
+ * p_sys->p_info->sequence->height / 4 );
+ memset( p_pic->p[2].p_pixels, 0x80,
+ p_sys->p_info->sequence->width
+ * p_sys->p_info->sequence->height / 4 );
+
+ if( p_sys->b_slice_i )
+ {
+ vout_SynchroNewPicture( p_sys->p_synchro,
+ I_CODING_TYPE, 2, 0, 0, p_sys->i_current_rate,
+ p_sys->p_info->sequence->flags & SEQ_FLAG_LOW_DELAY );
+ vout_SynchroDecode( p_sys->p_synchro );
+ vout_SynchroEnd( p_sys->p_synchro, I_CODING_TYPE, 0 );
+ }