[vlc-commits] use CLOCK_FREQ

Ilkka Ollakka git at videolan.org
Sun Sep 21 13:33:18 CEST 2014


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Mar 21 11:12:34 2014 +0200| [114d584be08283d59e962d38f0b1a96159d15592] | committer: Ilkka Ollakka

use CLOCK_FREQ

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

 modules/codec/twolame.c |    4 ++--
 modules/codec/x264.c    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/codec/twolame.c b/modules/codec/twolame.c
index 4abc72b..20ef952 100644
--- a/modules/codec/twolame.c
+++ b/modules/codec/twolame.c
@@ -275,7 +275,7 @@ static block_t *Encode( encoder_t *p_enc, block_t *p_aout_buf )
 
         p_block = block_Alloc( i_used );
         memcpy( p_block->p_buffer, p_sys->p_out_buffer, i_used );
-        p_block->i_length = (mtime_t)1000000 *
+        p_block->i_length = CLOCK_FREQ *
                 (mtime_t)MPEG_FRAME_SIZE / (mtime_t)p_enc->fmt_out.audio.i_rate;
         p_block->i_dts = p_block->i_pts = p_sys->i_pts;
         p_sys->i_pts += p_block->i_length;
@@ -305,7 +305,7 @@ static block_t *Encode( encoder_t *p_enc, block_t *p_aout_buf )
         p_sys->i_nb_samples = 0;
         p_block = block_Alloc( i_used );
         memcpy( p_block->p_buffer, p_sys->p_out_buffer, i_used );
-        p_block->i_length = (mtime_t)1000000 *
+        p_block->i_length = CLOCK_FREQ *
                 (mtime_t)MPEG_FRAME_SIZE / (mtime_t)p_enc->fmt_out.audio.i_rate;
         p_block->i_dts = p_block->i_pts = p_sys->i_pts;
         p_sys->i_pts += p_block->i_length;
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index b7778c1..9ade897 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -1289,7 +1289,7 @@ static int  Open ( vlc_object_t *p_this )
         p_sys->param.i_fps_num = p_enc->fmt_in.video.i_frame_rate;
         p_sys->param.i_fps_den = p_enc->fmt_in.video.i_frame_rate_base;
         p_sys->param.i_timebase_num = 1;
-        p_sys->param.i_timebase_den = INT64_C(1000000);
+        p_sys->param.i_timebase_den = CLOCK_FREQ;
         p_sys->param.b_vfr_input = 0;
     }
 
@@ -1541,7 +1541,7 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
         p_block->i_flags |= BLOCK_FLAG_TYPE_PB;
 
     /* This isn't really valid for streams with B-frames */
-    p_block->i_length = INT64_C(1000000) *
+    p_block->i_length = CLOCK_FREQ *
         p_enc->fmt_in.video.i_frame_rate_base /
             p_enc->fmt_in.video.i_frame_rate;
 



More information about the vlc-commits mailing list