const mtime_t i_es_delay = p_owner->i_ts_delay;
- if( p_clock )
- {
- const bool b_ephemere = pi_ts1 && *pi_ts0 == *pi_ts1;
- int i_rate;
+ if( !p_clock )
+ return;
- if( *pi_ts0 > VLC_TS_INVALID )
- {
- *pi_ts0 += i_es_delay;
- if( pi_ts1 && *pi_ts1 > VLC_TS_INVALID )
- *pi_ts1 += i_es_delay;
- if( input_clock_ConvertTS( p_clock, &i_rate, pi_ts0, pi_ts1, i_ts_bound ) )
- *pi_ts0 = VLC_TS_INVALID;
- }
- else
- {
- i_rate = input_clock_GetRate( p_clock );
- }
+ const bool b_ephemere = pi_ts1 && *pi_ts0 == *pi_ts1;
+ int i_rate;
- /* Do not create ephemere data because of rounding errors */
- if( !b_ephemere && pi_ts1 && *pi_ts0 == *pi_ts1 )
- *pi_ts1 += 1;
+ if( *pi_ts0 > VLC_TS_INVALID )
+ {
+ *pi_ts0 += i_es_delay;
+ if( pi_ts1 && *pi_ts1 > VLC_TS_INVALID )
+ *pi_ts1 += i_es_delay;
+ if( input_clock_ConvertTS( p_clock, &i_rate, pi_ts0, pi_ts1, i_ts_bound ) )
+ *pi_ts0 = VLC_TS_INVALID;
+ }
+ else
+ {
+ i_rate = input_clock_GetRate( p_clock );
+ }
- if( pi_duration )
- *pi_duration = ( *pi_duration * i_rate +
- INPUT_RATE_DEFAULT-1 ) / INPUT_RATE_DEFAULT;
+ /* Do not create ephemere data because of rounding errors */
+ if( !b_ephemere && pi_ts1 && *pi_ts0 == *pi_ts1 )
+ *pi_ts1 += 1;
- if( pi_rate )
- *pi_rate = i_rate;
- }
+ if( pi_duration )
+ *pi_duration = ( *pi_duration * i_rate + INPUT_RATE_DEFAULT-1 )
+ / INPUT_RATE_DEFAULT;
+
+ if( pi_rate )
+ *pi_rate = i_rate;
}
static bool DecoderIsExitRequested( decoder_t *p_dec )