Commit 114d584b authored by Ilkka Ollakka's avatar Ilkka Ollakka

use CLOCK_FREQ

parent e0618b18
......@@ -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;
......
......@@ -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;
......
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