Commit eefa50f8 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Cleanup

parent 00735462
...@@ -666,7 +666,7 @@ static int Demux( demux_t *p_demux ) ...@@ -666,7 +666,7 @@ static int Demux( demux_t *p_demux )
if( event->length != 0xff && p_sys->still.b_created ) if( event->length != 0xff && p_sys->still.b_created )
{ {
mtime_t delay = event->length * INT64_C(1) * CLOCK_FREQ; mtime_t delay = event->length * CLOCK_FREQ;
vlc_timer_schedule( &p_sys->still.timer, false, delay, 0 ); vlc_timer_schedule( &p_sys->still.timer, false, delay, 0 );
} }
......
...@@ -409,7 +409,7 @@ rtp_decode (demux_t *demux, const rtp_session_t *session, rtp_source_t *src) ...@@ -409,7 +409,7 @@ rtp_decode (demux_t *demux, const rtp_session_t *session, rtp_source_t *src)
/* FIXME: handle timestamp wrap properly */ /* FIXME: handle timestamp wrap properly */
/* TODO: inter-medias/sessions sync (using RTCP-SR) */ /* TODO: inter-medias/sessions sync (using RTCP-SR) */
const uint32_t timestamp = rtp_timestamp (block); const uint32_t timestamp = rtp_timestamp (block);
block->i_pts = UINT64_C(1) * CLOCK_FREQ * timestamp / pt->frequency; block->i_pts = CLOCK_FREQ * timestamp / pt->frequency;
/* CSRC count */ /* CSRC count */
size_t skip = 12u + (block->p_buffer[0] & 0x0F) * 4; size_t skip = 12u + (block->p_buffer[0] & 0x0F) * 4;
...@@ -489,8 +489,7 @@ bool rtp_dequeue (demux_t *demux, const rtp_session_t *session, ...@@ -489,8 +489,7 @@ bool rtp_dequeue (demux_t *demux, const rtp_session_t *session,
mtime_t deadline = src->last_rx; mtime_t deadline = src->last_rx;
const rtp_pt_t *pt = rtp_find_ptype (session, src, block, NULL); const rtp_pt_t *pt = rtp_find_ptype (session, src, block, NULL);
if (pt) if (pt)
deadline += UINT64_C(3) * CLOCK_FREQ * src->jitter deadline += CLOCK_FREQ * 3 * src->jitter / pt->frequency;
/ pt->frequency;
if (now >= deadline) if (now >= deadline)
{ {
......
...@@ -1631,7 +1631,7 @@ unsigned rtp_get_num( const sout_stream_id_t *id ) ...@@ -1631,7 +1631,7 @@ unsigned rtp_get_num( const sout_stream_id_t *id )
void rtp_packetize_common( sout_stream_id_t *id, block_t *out, void rtp_packetize_common( sout_stream_id_t *id, block_t *out,
int b_marker, int64_t i_pts ) int b_marker, int64_t i_pts )
{ {
uint32_t i_timestamp = i_pts * (int64_t)id->i_clock_rate / INT64_C(CLOCK_FREQ); uint32_t i_timestamp = i_pts * (int64_t)id->i_clock_rate / CLOCK_FREQ;
out->p_buffer[0] = 0x80; out->p_buffer[0] = 0x80;
out->p_buffer[1] = (b_marker?0x80:0x00)|id->i_payload_type; out->p_buffer[1] = (b_marker?0x80:0x00)|id->i_payload_type;
......
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