Commit 43937eba authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Jean-Baptiste Kempf

smf: simplify usage of VLC_TS_0

parent 798f81df
...@@ -342,7 +342,7 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr) ...@@ -342,7 +342,7 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr)
} }
send: send:
block->i_dts = block->i_pts = VLC_TS_0 + date_Get (&p_demux->p_sys->pts); block->i_dts = block->i_pts = date_Get (&p_demux->p_sys->pts);
es_out_Send (p_demux->out, p_demux->p_sys->es, block); es_out_Send (p_demux->out, p_demux->p_sys->es, block);
skip: skip:
...@@ -368,8 +368,7 @@ static int Demux (demux_t *p_demux) ...@@ -368,8 +368,7 @@ static int Demux (demux_t *p_demux)
if (pulse == UINT64_MAX) if (pulse == UINT64_MAX)
return 0; /* all tracks are done */ return 0; /* all tracks are done */
es_out_Control (p_demux->out, ES_OUT_SET_PCR, es_out_Control (p_demux->out, ES_OUT_SET_PCR, date_Get (&p_sys->pts));
VLC_TS_0 + date_Get (&p_sys->pts));
for (unsigned i = 0; i < p_sys->trackc; i++) for (unsigned i = 0; i < p_sys->trackc; i++)
{ {
...@@ -543,7 +542,7 @@ static int Open (vlc_object_t *obj) ...@@ -543,7 +542,7 @@ static int Open (vlc_object_t *obj)
/* Default SMF tempo is 120BPM, i.e. half a second per quarter note */ /* Default SMF tempo is 120BPM, i.e. half a second per quarter note */
date_Init (&sys->pts, ppqn * 2, 1); date_Init (&sys->pts, ppqn * 2, 1);
date_Set (&sys->pts, 0); date_Set (&sys->pts, VLC_TS_0);
sys->pulse = 0; sys->pulse = 0;
sys->ppqn = ppqn; sys->ppqn = ppqn;
......
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