[vlc-commits] jack: avoid date_Set()

Rémi Denis-Courmont git at videolan.org
Wed May 2 16:13:55 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May  2 17:06:01 2018 +0300| [ca9f1e941c3367911a9d614d111ab9bfa1c58c4e] | committer: Rémi Denis-Courmont

jack: avoid date_Set()

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

 modules/access/jack.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/access/jack.c b/modules/access/jack.c
index ac166ea7bb..94d4c4e451 100644
--- a/modules/access/jack.c
+++ b/modules/access/jack.c
@@ -290,7 +290,6 @@ static int Open( vlc_object_t *p_this )
 
     p_sys->p_es_audio = es_out_Add( p_demux->out, &fmt );
     date_Init( &p_sys->pts, fmt.audio.i_rate, 1 );
-    date_Set( &p_sys->pts, 1 );
 
     return VLC_SUCCESS;
 }
@@ -464,7 +463,7 @@ static block_t *GrabJack( demux_t *p_demux )
 
     i_read = jack_ringbuffer_read( p_sys->p_jack_ringbuffer, ( char * ) p_block->p_buffer, i_read );
 
-    p_block->i_dts = p_block->i_pts =    date_Increment( &p_sys->pts,
+    p_block->i_dts = p_block->i_pts = VLC_TS_0 + date_Increment( &p_sys->pts,
          i_read/(p_sys->i_channels * p_sys->jack_sample_size) );
 
     p_sys->p_block_audio = p_block;



More information about the vlc-commits mailing list