[vlc-commits] stream: use CLOCK_FREQ

Tristan Matthews git at videolan.org
Thu Jul 17 07:56:23 CEST 2014


vlc | branch: master | Tristan Matthews <le.businessman at gmail.com> | Thu Jul 17 01:55:37 2014 -0400| [69de17480b5df38832a31e2fce2d38c53fb28dbf] | committer: Tristan Matthews

stream: use CLOCK_FREQ

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

 src/input/stream.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index 0179cba..64d47b4 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -691,13 +691,13 @@ static void AStreamPrebufferBlock( stream_t *s )
             /* Update stat */
             p_sys->stat.i_bytes = p_sys->block.i_size;
             p_sys->stat.i_read_time = i_date - i_start;
-            i_byterate = ( INT64_C(1000000) * p_sys->stat.i_bytes ) /
+            i_byterate = ( CLOCK_FREQ * p_sys->stat.i_bytes ) /
                          (p_sys->stat.i_read_time + 1);
 
             msg_Dbg( s, "prebuffering done %"PRId64" bytes in %"PRId64"s - "
                      "%"PRId64" KiB/s",
                      p_sys->stat.i_bytes,
-                     p_sys->stat.i_read_time / INT64_C(1000000),
+                     p_sys->stat.i_read_time / CLOCK_FREQ,
                      i_byterate / 1024 );
             break;
         }
@@ -1446,13 +1446,13 @@ static void AStreamPrebufferStream( stream_t *s )
             /* Update stat */
             p_sys->stat.i_bytes = i_buffered;
             p_sys->stat.i_read_time = i_date - i_start;
-            i_byterate = ( INT64_C(1000000) * p_sys->stat.i_bytes ) /
+            i_byterate = ( CLOCK_FREQ * p_sys->stat.i_bytes ) /
                          (p_sys->stat.i_read_time+1);
 
             msg_Dbg( s, "pre-buffering done %"PRId64" bytes in %"PRId64"s - "
                      "%"PRId64" KiB/s",
                      p_sys->stat.i_bytes,
-                     p_sys->stat.i_read_time / INT64_C(1000000),
+                     p_sys->stat.i_read_time / CLOCK_FREQ,
                      i_byterate / 1024 );
             break;
         }



More information about the vlc-commits mailing list