[vlc-commits] ogg: use CLOCK_FREQ in muxer

Tristan Matthews git at videolan.org
Fri Dec 13 17:07:38 CET 2013


vlc | branch: master | Tristan Matthews <le.businessman at gmail.com> | Fri Dec 13 11:05:55 2013 -0500| [425521e9cd087612afb46c93d7427d531929e2a4] | committer: Tristan Matthews

ogg: use CLOCK_FREQ in muxer

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

 modules/mux/ogg.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
index 20947f9..26a6990 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -1541,7 +1541,7 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
             /* number of sample from begining + current packet */
             op.granulepos =
                 ( p_data->i_dts - p_sys->i_start_dts + p_data->i_length ) *
-                (mtime_t)p_input->p_fmt->audio.i_rate / INT64_C(1000000);
+                (mtime_t)p_input->p_fmt->audio.i_rate / CLOCK_FREQ;
 
             i_time = p_data->i_dts - p_sys->i_start_dts;
             AddIndexEntry( p_mux, i_time, p_input );
@@ -1550,7 +1550,7 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
         {
             /* number of sample from begining */
             op.granulepos = ( p_data->i_dts - p_sys->i_start_dts ) *
-                p_stream->p_oggds_header->i_samples_per_unit / INT64_C(1000000);
+                p_stream->p_oggds_header->i_samples_per_unit / CLOCK_FREQ;
         }
     }
     else if( p_stream->i_cat == VIDEO_ES )
@@ -1564,7 +1564,7 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
                 p_stream->i_last_keyframe = p_stream->i_num_frames;
 
                 /* presentation time */
-                i_time = INT64_C(1000000) * ( p_stream->i_num_frames - 1 ) *
+                i_time = CLOCK_FREQ * ( p_stream->i_num_frames - 1 ) *
                          p_input->p_fmt->video.i_frame_rate_base /  p_input->p_fmt->video.i_frame_rate;
                 AddIndexEntry( p_mux, i_time, p_input );
             }
@@ -1577,11 +1577,11 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
             mtime_t dt = (p_data->i_dts - p_sys->i_start_dts + 1)
                        * p_input->p_fmt->video.i_frame_rate *2
                        / p_input->p_fmt->video.i_frame_rate_base
-                       / INT64_C(1000000);
+                       / CLOCK_FREQ;
             mtime_t delay = (p_data->i_pts - p_data->i_dts + 1)
                           * p_input->p_fmt->video.i_frame_rate *2
                           / p_input->p_fmt->video.i_frame_rate_base
-                          / INT64_C(1000000);
+                          / CLOCK_FREQ;
             if( p_data->i_flags & BLOCK_FLAG_TYPE_I )
                 p_stream->i_last_keyframe = dt;
             mtime_t dist = dt - p_stream->i_last_keyframe;



More information about the vlc-commits mailing list