Fixed scaletempo after "audio filter2" conversion.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 4 Oct 2009 16:40:22 +0000 (18:40 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 4 Oct 2009 16:48:49 +0000 (18:48 +0200)
The output timestamp/length wasn't set anymore.

modules/audio_filter/scaletempo.c

index 225f884..8c9e974 100644 (file)
@@ -493,8 +493,11 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
         p_in_buf->p_buffer, p_in_buf->i_buffer,
         p_out_buf->p_buffer );
 
-    block_Release( p_in_buf );
-    p_out_buf->i_buffer   = bytes_out;
+    p_out_buf->i_buffer     = bytes_out;
     p_out_buf->i_nb_samples = bytes_out / p->bytes_per_frame;
+    p_out_buf->i_pts        = p_in_buf->i_pts;
+    p_out_buf->i_length     = p_in_buf->i_length;
+
+    block_Release( p_in_buf );
     return p_out_buf;
 }