Commit 8e51b8da authored by Francois Cartegnie's avatar Francois Cartegnie

decoder: rename confusing frame drop member

not related to the other pace controls
parent 1637cd91
...@@ -66,7 +66,7 @@ struct decoder_t ...@@ -66,7 +66,7 @@ struct decoder_t
bool b_need_packetized; bool b_need_packetized;
/* Tell the decoder if it is allowed to drop frames */ /* Tell the decoder if it is allowed to drop frames */
bool b_pace_control; bool b_frame_drop_allowed;
/* */ /* */
picture_t * ( * pf_decode_video )( decoder_t *, block_t ** ); picture_t * ( * pf_decode_video )( decoder_t *, block_t ** );
......
...@@ -547,7 +547,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) ...@@ -547,7 +547,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
} }
} }
if( !p_dec->b_pace_control && (p_sys->i_late_frames > 0) && if( p_dec->b_frame_drop_allowed && (p_sys->i_late_frames > 0) &&
(mdate() - p_sys->i_late_frames_start > INT64_C(5000000)) ) (mdate() - p_sys->i_late_frames_start > INT64_C(5000000)) )
{ {
if( p_sys->i_pts > VLC_TS_INVALID ) if( p_sys->i_pts > VLC_TS_INVALID )
...@@ -563,7 +563,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) ...@@ -563,7 +563,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
} }
/* A good idea could be to decode all I pictures and see for the other */ /* A good idea could be to decode all I pictures and see for the other */
if( !p_dec->b_pace_control && if( p_dec->b_frame_drop_allowed &&
p_sys->b_hurry_up && p_sys->b_hurry_up &&
(p_sys->i_late_frames > 4) ) (p_sys->i_late_frames > 4) )
{ {
......
...@@ -388,7 +388,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) ...@@ -388,7 +388,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
picture_t *p_pic; picture_t *p_pic;
if( !p_dec->b_pace_control && !p_sys->b_preroll && if( p_dec->b_frame_drop_allowed && !p_sys->b_preroll &&
!(p_sys->b_slice_i !(p_sys->b_slice_i
&& ((p_current->flags && ((p_current->flags
& PIC_MASK_CODING_TYPE) == PIC_FLAG_CODING_TYPE_P)) & PIC_MASK_CODING_TYPE) == PIC_FLAG_CODING_TYPE_P))
......
...@@ -286,7 +286,7 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p ...@@ -286,7 +286,7 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p
return NULL; return NULL;
p_sys->p_decoder->p_module = NULL; p_sys->p_decoder->p_module = NULL;
p_sys->p_decoder->fmt_in = *p_fmt; p_sys->p_decoder->fmt_in = *p_fmt;
p_sys->p_decoder->b_pace_control = false; p_sys->p_decoder->b_frame_drop_allowed = true;
p_sys->p_decoder->fmt_out = p_sys->p_decoder->fmt_in; p_sys->p_decoder->fmt_out = p_sys->p_decoder->fmt_in;
p_sys->p_decoder->fmt_out.i_extra = 0; p_sys->p_decoder->fmt_out.i_extra = 0;
p_sys->p_decoder->fmt_out.p_extra = 0; p_sys->p_decoder->fmt_out.p_extra = 0;
......
...@@ -518,7 +518,7 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, ...@@ -518,7 +518,7 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream,
goto error; goto error;
id->p_decoder->p_module = NULL; id->p_decoder->p_module = NULL;
id->p_decoder->fmt_in = *p_fmt; id->p_decoder->fmt_in = *p_fmt;
id->p_decoder->b_pace_control = true; id->p_decoder->b_frame_drop_allowed = false;
/* Create encoder object */ /* Create encoder object */
id->p_encoder = sout_EncoderCreate( p_stream ); id->p_encoder = sout_EncoderCreate( p_stream );
......
...@@ -1476,6 +1476,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent, ...@@ -1476,6 +1476,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
if( p_dec == NULL ) if( p_dec == NULL )
return NULL; return NULL;
p_dec->b_frame_drop_allowed = true;
p_dec->pf_decode_audio = NULL; p_dec->pf_decode_audio = NULL;
p_dec->pf_decode_video = NULL; p_dec->pf_decode_video = NULL;
p_dec->pf_decode_sub = NULL; p_dec->pf_decode_sub = NULL;
......
...@@ -610,7 +610,7 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt ) ...@@ -610,7 +610,7 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt )
es_format_Init( &p_dec->fmt_in, VIDEO_ES, fmt->i_chroma ); es_format_Init( &p_dec->fmt_in, VIDEO_ES, fmt->i_chroma );
es_format_Init( &p_dec->fmt_out, VIDEO_ES, 0 ); es_format_Init( &p_dec->fmt_out, VIDEO_ES, 0 );
p_dec->fmt_in.video = *fmt; p_dec->fmt_in.video = *fmt;
p_dec->b_pace_control = true; p_dec->b_frame_drop_allowed = false;
p_dec->pf_vout_format_update = video_update_format; p_dec->pf_vout_format_update = video_update_format;
p_dec->pf_vout_buffer_new = video_new_buffer; p_dec->pf_vout_buffer_new = video_new_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