[vlc-commits] fdkaac: set i_nb_samples for output blocks

Ilkka Ollakka git at videolan.org
Fri Mar 21 10:53:59 CET 2014


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Mar 21 11:51:10 2014 +0200| [302af54f27d7dd1693c8a242306e459d8b512adf] | committer: Ilkka Ollakka

fdkaac: set i_nb_samples for output blocks

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

 modules/codec/fdkaac.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/codec/fdkaac.c b/modules/codec/fdkaac.c
index 297f8dc..b8af7df 100644
--- a/modules/codec/fdkaac.c
+++ b/modules/codec/fdkaac.c
@@ -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);
                     p_block->i_length = (mtime_t)((double)CLOCK_FREQ * (double)p_sys->i_frame_size /
                         (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;
                 }
                 else
@@ -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);
                     i_pts_out += (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;



More information about the vlc-commits mailing list