Commit 302af54f authored by Ilkka Ollakka's avatar Ilkka Ollakka

fdkaac: set i_nb_samples for output blocks

parent 218f8cec
...@@ -505,6 +505,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf ) ...@@ -505,6 +505,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
(double)p_enc->fmt_out.audio.i_rate); (double)p_enc->fmt_out.audio.i_rate);
p_block->i_length = (mtime_t)((double)CLOCK_FREQ * (double)p_sys->i_frame_size / p_block->i_length = (mtime_t)((double)CLOCK_FREQ * (double)p_sys->i_frame_size /
(double)p_enc->fmt_out.audio.i_rate); (double)p_enc->fmt_out.audio.i_rate);
p_block->i_nb_samples = d_samples_delay;
//p_block->i_length = i_pts_out - p_sys->i_pts_last; //p_block->i_length = i_pts_out - p_sys->i_pts_last;
} }
else else
...@@ -514,6 +515,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf ) ...@@ -514,6 +515,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
(double)p_enc->fmt_out.audio.i_rate); (double)p_enc->fmt_out.audio.i_rate);
i_pts_out += (mtime_t) d_length; i_pts_out += (mtime_t) d_length;
p_block->i_length = (mtime_t) d_length; p_block->i_length = (mtime_t) d_length;
p_block->i_nb_samples = d_samples_forward;
} }
} }
p_block->i_dts = p_block->i_pts = i_pts_out; p_block->i_dts = p_block->i_pts = i_pts_out;
......
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