[vlc-commits] scaletempo: fix output length

Thomas Guillem git at videolan.org
Tue Feb 19 17:56:03 CET 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Feb 19 17:17:23 2019 +0100| [2b0cd875c02c056482d2d6af8bc9b563e7fe2916] | committer: Thomas Guillem

scaletempo: fix output length

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

 modules/audio_filter/scaletempo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/audio_filter/scaletempo.c b/modules/audio_filter/scaletempo.c
index 881f1bcbdb..bb6f703088 100644
--- a/modules/audio_filter/scaletempo.c
+++ b/modules/audio_filter/scaletempo.c
@@ -592,7 +592,8 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
         p_out_buf->i_nb_samples = bytes_out / p->bytes_per_frame;
         p_out_buf->i_dts        = p_in_buf->i_dts;
         p_out_buf->i_pts        = p_in_buf->i_pts;
-        p_out_buf->i_length     = p_in_buf->i_length;
+        p_out_buf->i_length     = p_in_buf->i_length * p_out_buf->i_buffer
+                                                     / p_in_buf->i_buffer;
     }
 
     block_Release( p_in_buf );



More information about the vlc-commits mailing list