Browse Source

access: live555: use std::min/max where applicable

pull/136/head
Marvin Scholz 4 years ago
committed by Felix Paul Kühne
parent
commit
cd1eb55eee
  1. 7
      modules/access/live555.cpp

7
modules/access/live555.cpp

@ -32,6 +32,7 @@
#endif
#include <inttypes.h>
#include <algorithm>
#include <vlc_common.h>
#include <vlc_plugin.h>
@ -1483,12 +1484,12 @@ static int Demux( demux_t *p_demux )
}
if( p_sys->i_pcr != VLC_TICK_INVALID )
es_out_SetPCR( p_demux->out, VLC_TICK_0 +
__MAX(0, p_sys->i_pcr - PCR_OFF) );
std::max<vlc_tick_t>(0, p_sys->i_pcr - PCR_OFF) );
}
else if( p_sys->i_pcr == VLC_TICK_INVALID ||
i_minpcr > p_sys->i_pcr + PCR_OBS )
{
p_sys->i_pcr = __MAX(0, i_minpcr - PCR_OFF);
p_sys->i_pcr = std::max<vlc_tick_t>(0, i_minpcr - PCR_OFF);
if( p_sys->i_pcr != VLC_TICK_INVALID )
es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_pcr );
}
@ -1900,7 +1901,7 @@ static block_t *StreamParseAsf( demux_t *p_demux, live_track_t *tk,
*/
unsigned i_payload;
if( b_length )
i_payload = __MIN( i_length_offset, i_size - i_header_size);
i_payload = std::min( i_length_offset, i_size - i_header_size);
else
i_payload = i_size - i_header_size;

Loading…
Cancel
Save