[vlc-devel] commit: Cleanup ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Jun 9 17:59:27 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jun  9 18:57:49 2009 +0300| [eefa50f812dff12745d300b306b5100e4022bc06] | committer: Rémi Denis-Courmont 

Cleanup

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eefa50f812dff12745d300b306b5100e4022bc06
---

 modules/access/dvdnav.c      |    2 +-
 modules/access/rtp/session.c |    5 ++---
 modules/stream_out/rtp.c     |    2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 6d0f2a6..3e3e03f 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -666,7 +666,7 @@ static int Demux( demux_t *p_demux )
 
             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 );
             }
 
diff --git a/modules/access/rtp/session.c b/modules/access/rtp/session.c
index 430f328..c3755d5 100644
--- a/modules/access/rtp/session.c
+++ b/modules/access/rtp/session.c
@@ -409,7 +409,7 @@ rtp_decode (demux_t *demux, const rtp_session_t *session, rtp_source_t *src)
     /* FIXME: handle timestamp wrap properly */
     /* TODO: inter-medias/sessions sync (using RTCP-SR) */
     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 */
     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,
             mtime_t deadline = src->last_rx;
             const rtp_pt_t *pt = rtp_find_ptype (session, src, block, NULL);
             if (pt)
-                deadline += UINT64_C(3) * CLOCK_FREQ * src->jitter
-                            / pt->frequency;
+                deadline += CLOCK_FREQ * 3 * src->jitter / pt->frequency;
 
             if (now >= deadline)
             {
diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index e96139e..51bcf4d 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -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,
                            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[1] = (b_marker?0x80:0x00)|id->i_payload_type;




More information about the vlc-devel mailing list