-/*****************************************************************************
- * input_clock_GetTS: manages a PTS or DTS
- *****************************************************************************/
-mtime_t input_clock_GetTS( input_clock_t *cl,
- mtime_t i_pts_delay, mtime_t i_ts )
-{
- mtime_t i_converted_ts;
-
- if( !cl->b_has_reference )
- return 0;
-
- /* */
- i_converted_ts = ClockStreamToSystem( cl, i_ts + AvgGet( &cl->drift ) );
- if( i_converted_ts > cl->i_ts_max )
- cl->i_ts_max = i_converted_ts;
-
- return i_converted_ts + i_pts_delay;
-}
-