Commit 39868b92 authored by Laurent Aimar's avatar Laurent Aimar

Moved i_cr_average from input_source_t to input_thread_private_t.

parent dd3a0dd1
...@@ -1004,7 +1004,7 @@ static es_out_pgrm_t *EsOutProgramAdd( es_out_t *out, int i_group ) ...@@ -1004,7 +1004,7 @@ static es_out_pgrm_t *EsOutProgramAdd( es_out_t *out, int i_group )
p_pgrm->psz_now_playing = NULL; p_pgrm->psz_now_playing = NULL;
p_pgrm->psz_publisher = NULL; p_pgrm->psz_publisher = NULL;
p_pgrm->p_epg = NULL; p_pgrm->p_epg = NULL;
p_pgrm->p_clock = input_clock_New( p_input->p->input.i_cr_average, p_sys->i_rate ); p_pgrm->p_clock = input_clock_New( p_input->p->i_cr_average, p_sys->i_rate );
if( !p_pgrm->p_clock ) if( !p_pgrm->p_clock )
{ {
free( p_pgrm ); free( p_pgrm );
......
...@@ -188,6 +188,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item, ...@@ -188,6 +188,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input->p->p_sout = NULL; p_input->p->p_sout = NULL;
p_input->p->b_out_pace_control = false; p_input->p->b_out_pace_control = false;
p_input->i_pts_delay = 0; p_input->i_pts_delay = 0;
p_input->p->i_cr_average = 0;
vlc_gc_incref( p_item ); /* Released in Destructor() */ vlc_gc_incref( p_item ); /* Released in Destructor() */
p_input->p->p_item = p_item; p_input->p->p_item = p_item;
...@@ -204,7 +205,6 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item, ...@@ -204,7 +205,6 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input->p->input.b_can_rate_control = true; p_input->p->input.b_can_rate_control = true;
p_input->p->input.b_rescale_ts = true; p_input->p->input.b_rescale_ts = true;
p_input->p->input.b_eof = false; p_input->p->input.b_eof = false;
p_input->p->input.i_cr_average = 0;
vlc_mutex_lock( &p_item->lock ); vlc_mutex_lock( &p_item->lock );
...@@ -236,7 +236,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item, ...@@ -236,7 +236,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
input_ControlVarInit( p_input ); input_ControlVarInit( p_input );
/* */ /* */
p_input->p->input.i_cr_average = var_GetInteger( p_input, "cr-average" ); p_input->p->i_cr_average = var_GetInteger( p_input, "cr-average" );
if( !p_input->b_preparsing ) if( !p_input->b_preparsing )
{ {
...@@ -938,10 +938,10 @@ static void InitTitle( input_thread_t * p_input ) ...@@ -938,10 +938,10 @@ static void InitTitle( input_thread_t * p_input )
p_input->i_pts_delay -= i_desynch * 1000; p_input->i_pts_delay -= i_desynch * 1000;
/* Update cr_average depending on the caching */ /* Update cr_average depending on the caching */
p_master->i_cr_average *= (10 * p_input->i_pts_delay / 200000); p_input->p->i_cr_average *= (10 * p_input->i_pts_delay / 200000);
p_master->i_cr_average /= 10; p_input->p->i_cr_average /= 10;
if( p_master->i_cr_average < 10 ) if( p_input->p->i_cr_average < 10 )
p_master->i_cr_average = 10; p_input->p->i_cr_average = 10;
} }
static void StartTitle( input_thread_t * p_input ) static void StartTitle( input_thread_t * p_input )
......
...@@ -71,9 +71,6 @@ typedef struct ...@@ -71,9 +71,6 @@ typedef struct
bool b_eof; /* eof of demuxer */ bool b_eof; /* eof of demuxer */
double f_fps; double f_fps;
/* Clock average variation */
int i_cr_average;
} input_source_t; } input_source_t;
/** Private input fields */ /** Private input fields */
...@@ -115,10 +112,14 @@ struct input_thread_private_t ...@@ -115,10 +112,14 @@ struct input_thread_private_t
bool b_out_pace_control; /* idem ? */ bool b_out_pace_control; /* idem ? */
/* Main input properties */ /* Main input properties */
input_item_t *p_item;
/* Input item */
input_item_t *p_item;
/* Clock average variation */
int i_cr_average;
/* Main source */
input_source_t input; input_source_t input;
/* Slave demuxers (subs, and others) */ /* Slave sources (subs, and others) */
int i_slave; int i_slave;
input_source_t **slave; input_source_t **slave;
......
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