diff --git a/include/vlc_common.h b/include/vlc_common.h
index fc335fd9a8a90466bb845513191fc35fcca23c94..8090b277150dfa79e8ab6ae73bca525f8c1550ff 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -156,6 +156,7 @@ typedef int64_t vlc_tick_t;
 typedef vlc_tick_t mtime_t; /* deprecated, use vlc_tick_t */
 
 #define VLC_TICK_INVALID  VLC_TS_INVALID
+#define VLC_TICK_0        VLC_TS_0
 
 /**
  * The vlc_fourcc_t type.
diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index e10a0fbb51fdc80c2a1796cd524f3a12a4abf944..e3e5bf63829ca41f9788f3005c09ee7e7ec927e6 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -171,11 +171,11 @@ static int Demux(demux_t *demux)
     sys->position += count;
 
     block->i_nb_samples = block->i_buffer / 4;
-    block->i_dts = block->i_pts = VLC_TS_0 + date_Get(&sys->pts);
+    block->i_dts = block->i_pts = VLC_TICK_0 + date_Get(&sys->pts);
     date_Increment(&sys->pts, block->i_nb_samples);
 
     es_out_Send(demux->out, sys->es, block);
-    es_out_SetPCR(demux->out, VLC_TS_0 + date_Get(&sys->pts));
+    es_out_SetPCR(demux->out, VLC_TICK_0 + date_Get(&sys->pts));
     return VLC_DEMUXER_SUCCESS;
 }
 
diff --git a/modules/access/decklink.cpp b/modules/access/decklink.cpp
index c0ded3f051a6293f08a9b44dce10e88899249cf9..42323b5c1b5a54536445b23aea005a1742eb6ef4 100644
--- a/modules/access/decklink.cpp
+++ b/modules/access/decklink.cpp
@@ -334,7 +334,7 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame
         BMDTimeValue stream_time, frame_duration;
         videoFrame->GetStreamTime(&stream_time, &frame_duration, CLOCK_FREQ);
         video_frame->i_flags = BLOCK_FLAG_TYPE_I | sys->dominance_flags;
-        video_frame->i_pts = video_frame->i_dts = VLC_TS_0 + stream_time;
+        video_frame->i_pts = video_frame->i_dts = VLC_TICK_0 + stream_time;
 
         if (sys->video_fmt.i_codec == VLC_CODEC_I422_10L) {
             v210_convert((uint16_t*)video_frame->p_buffer, frame_bytes, width, height);
@@ -349,7 +349,7 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame
                     block_t *cc = vanc_to_cc(demux_, dec, width * 2);
                     if (!cc)
                         continue;
-                    cc->i_pts = cc->i_dts = VLC_TS_0 + stream_time;
+                    cc->i_pts = cc->i_dts = VLC_TICK_0 + stream_time;
 
                     if (!sys->cc_es) {
                         es_format_t fmt;
@@ -401,7 +401,7 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame
 
         BMDTimeValue packet_time;
         audioFrame->GetPacketTime(&packet_time, CLOCK_FREQ);
-        audio_frame->i_pts = audio_frame->i_dts = VLC_TS_0 + packet_time;
+        audio_frame->i_pts = audio_frame->i_dts = VLC_TICK_0 + packet_time;
 
         vlc_mutex_lock(&sys->pts_lock);
         if (audio_frame->i_pts > sys->last_pts)
diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index 147b9e88c9e60f6855fb14ee43f3a3b29d897d95..854e8800507db97c26860bfe8a6df03c63033d48 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -1889,7 +1889,7 @@ static int Demux( demux_t *p_demux )
             if( i_pts > VLC_TICK_INVALID ) {
                 i_pts += (i_pts >= 0) ? +5 : -4;
                 i_pts /= 10; /* 100-ns to µs conversion */
-                i_pts += VLC_TS_0;
+                i_pts += VLC_TICK_0;
             }
 #if 0
             msg_Dbg( p_demux, "Read() stream: %i, size: %i, PTS: %" PRId64,
diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c
index 9261427e54608773f420b2b91d0734eea173f5a8..37ad0d51b2f142b799479af655593270604f13e6 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -643,7 +643,7 @@ static int DemuxBlock( demux_t *p_demux, const uint8_t *p, int len )
             int i_mux_rate;
             if( !ps_pkt_parse_pack( p_pkt, &i_scr, &i_mux_rate ) )
             {
-                es_out_SetPCR( p_demux->out, VLC_TS_0 + i_scr );
+                es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_scr );
                 if( i_mux_rate > 0 ) p_sys->i_mux_rate = i_mux_rate;
             }
             block_Release( p_pkt );
diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp
index 9037ae42a3a416336c3be275566a5cad9afcd5a1..b219147b0928068427085da19fb03c9dcbb49a52 100644
--- a/modules/access/live555.cpp
+++ b/modules/access/live555.cpp
@@ -1481,7 +1481,7 @@ static int Demux( demux_t *p_demux )
                 tk->i_next_block_flags |= BLOCK_FLAG_DISCONTINUITY;
             }
             if( p_sys->i_pcr != VLC_TICK_INVALID )
-                es_out_SetPCR( p_demux->out, VLC_TS_0 +
+                es_out_SetPCR( p_demux->out, VLC_TICK_0 +
                                __MAX(0, p_sys->i_pcr - PCR_OFF) );
         }
         else if( p_sys->i_pcr == VLC_TICK_INVALID ||
@@ -1489,7 +1489,7 @@ static int Demux( demux_t *p_demux )
         {
             p_sys->i_pcr = __MAX(0, i_minpcr - PCR_OFF);
             if( p_sys->i_pcr != VLC_TICK_INVALID )
-                es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr );
+                es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_pcr );
         }
     }
 
@@ -2151,7 +2151,7 @@ static void StreamRead( void *p_private, unsigned int i_size,
             default:
                 if( i_pts != tk->i_prevpts )
                 {
-                    p_block->i_pts = VLC_TS_0 + i_pts;
+                    p_block->i_pts = VLC_TICK_0 + i_pts;
                     tk->i_prevpts = i_pts;
 
                     dtsgen_AddNextPTS( &tk->dtsgen, i_pts );
@@ -2168,7 +2168,7 @@ static void StreamRead( void *p_private, unsigned int i_size,
                         break;
                     case VLC_CODEC_VP8:
                     default:
-                        p_block->i_dts = VLC_TS_0 + i_pts;
+                        p_block->i_dts = VLC_TICK_0 + i_pts;
                         break;
                 }
 
diff --git a/modules/access/live555_dtsgen.h b/modules/access/live555_dtsgen.h
index 1df71fa334341020d5cfbd7a48d402344ab0d685..5fb17d64a18293052b185725286118c320fbd06a 100644
--- a/modules/access/live555_dtsgen.h
+++ b/modules/access/live555_dtsgen.h
@@ -151,7 +151,7 @@ static vlc_tick_t dtsgen_GetDTS(struct dtsgen_t *d)
     else if(d->count == 1)
     {
         d->i_startingdts =
-        i_dts = __MAX(d->history[0] - 150000, VLC_TS_0);
+        i_dts = __MAX(d->history[0] - 150000, VLC_TICK_0);
         d->i_startingdiff = d->history[0] - i_dts;
     }
     else if(d->count > 1)
diff --git a/modules/access/rtp/session.c b/modules/access/rtp/session.c
index 11bef01c5f219cc215ccd602fbce8862cfbeae61..5b181a4075be7401cd90d2d75eeb2ec4a42ddcd7 100644
--- a/modules/access/rtp/session.c
+++ b/modules/access/rtp/session.c
@@ -169,7 +169,7 @@ rtp_source_create (demux_t *demux, const rtp_session_t *session,
     source->ssrc = ssrc;
     source->jitter = 0;
     source->ref_rtp = 0;
-    /* TODO: use VLC_TS_0, but VLC does not like negative PTS at the moment */
+    /* TODO: use VLC_TICK_0, but VLC does not like negative PTS at the moment */
     source->ref_ntp = UINT64_C (1) << 62;
     source->max_seq = source->bad_seq = init_seq;
     source->last_seq = init_seq - 1;
diff --git a/modules/access/timecode.c b/modules/access/timecode.c
index 44a37ff74eced3517fc178a018f8883949f33ed3..18a5d2a6338f185e9ffe22a24995cca21f7a971d 100644
--- a/modules/access/timecode.c
+++ b/modules/access/timecode.c
@@ -185,7 +185,7 @@ static int Open (vlc_object_t *obj)
     }
 
     date_Init (&sys->date, num, den);
-    date_Set (&sys->date, VLC_TS_0);
+    date_Set (&sys->date, VLC_TICK_0);
     sys->next_time = VLC_TICK_INVALID;
 
     demux->p_sys = sys;
diff --git a/modules/codec/stl.c b/modules/codec/stl.c
index 9c6ddc9663cb040bf563c4af784152fc4ffefd92..d9b97bc49b8dfe5e2724116ab2e18f35667b7991 100644
--- a/modules/codec/stl.c
+++ b/modules/codec/stl.c
@@ -413,8 +413,8 @@ static int Decode(decoder_t *p_dec, block_t *p_block)
 
                 if(p_group->i_end && p_group->i_start >= p_block->i_dts)
                 {
-                    p_sub->i_start = VLC_TS_0 + p_group->i_start;
-                    p_sub->i_stop =  VLC_TS_0 + p_group->i_end;
+                    p_sub->i_start = VLC_TICK_0 + p_group->i_start;
+                    p_sub->i_stop =  VLC_TICK_0 + p_group->i_end;
                 }
                 else
                 {
diff --git a/modules/codec/textst.c b/modules/codec/textst.c
index d3949ced7d1579f552ab29a93c55eeffa6c6c417..f96f0175a77ad2bc0a42e71c78fa5fe50fc5f4dd 100644
--- a/modules/codec/textst.c
+++ b/modules/codec/textst.c
@@ -236,8 +236,8 @@ static int Decode(decoder_t *p_dec, block_t *p_block)
     {
         p_sub->i_start = ((int64_t) (p_block->p_buffer[3] & 0x01) << 32) | GetDWBE(&p_block->p_buffer[4]);
         p_sub->i_stop = ((int64_t) (p_block->p_buffer[8] & 0x01) << 32) | GetDWBE(&p_block->p_buffer[9]);
-        p_sub->i_start = VLC_TS_0 + p_sub->i_start * 100 / 9;
-        p_sub->i_stop = VLC_TS_0 + p_sub->i_stop * 100 / 9;
+        p_sub->i_start = VLC_TICK_0 + p_sub->i_start * 100 / 9;
+        p_sub->i_stop = VLC_TICK_0 + p_sub->i_stop * 100 / 9;
         if (p_sub->i_start < p_block->i_dts)
         {
             p_sub->i_stop += p_block->i_dts - p_sub->i_start;
diff --git a/modules/codec/ttml/substtml.c b/modules/codec/ttml/substtml.c
index dfe447dbc385daafff885afb1bd1f8435b8c9e60..d40d727b5c7f291d477a220ce71ca73ddd388331 100644
--- a/modules/codec/ttml/substtml.c
+++ b/modules/codec/ttml/substtml.c
@@ -1060,18 +1060,18 @@ static int ParseBlock( decoder_t *p_dec, const block_t *p_block )
     for( size_t i=0; i+1 < i_timings_count; i++ )
     {
         /* We Only support absolute timings (2) */
-        if( tt_time_Convert( &p_timings_array[i] ) + VLC_TS_0 < p_block->i_dts )
+        if( tt_time_Convert( &p_timings_array[i] ) + VLC_TICK_0 < p_block->i_dts )
             continue;
 
-        if( tt_time_Convert( &p_timings_array[i] ) + VLC_TS_0 > p_block->i_dts + p_block->i_length )
+        if( tt_time_Convert( &p_timings_array[i] ) + VLC_TICK_0 > p_block->i_dts + p_block->i_length )
             break;
 
         subpicture_t *p_spu = NULL;
         ttml_region_t *p_regions = GenerateRegions( p_rootnode, p_timings_array[i] );
         if( p_regions && ( p_spu = decoder_NewSubpictureText( p_dec ) ) )
         {
-            p_spu->i_start    = VLC_TS_0 + tt_time_Convert( &p_timings_array[i] );
-            p_spu->i_stop     = VLC_TS_0 + tt_time_Convert( &p_timings_array[i+1] ) - 1;
+            p_spu->i_start    = VLC_TICK_0 + tt_time_Convert( &p_timings_array[i] );
+            p_spu->i_stop     = VLC_TICK_0 + tt_time_Convert( &p_timings_array[i+1] ) - 1;
             p_spu->b_ephemer  = true;
             p_spu->b_absolute = true;
 
diff --git a/modules/codec/webvtt/subsvtt.c b/modules/codec/webvtt/subsvtt.c
index 3817e043d84db3da7435287071887adfd5380523..f113501663022fa08f837fb2817e6b80ca273cb9 100644
--- a/modules/codec/webvtt/subsvtt.c
+++ b/modules/codec/webvtt/subsvtt.c
@@ -1808,8 +1808,8 @@ static void RenderRegions( decoder_t *p_dec, vlc_tick_t i_nzstart, vlc_tick_t i_
 
     if( p_spu )
     {
-        p_spu->i_start = VLC_TS_0 + i_nzstart;
-        p_spu->i_stop = VLC_TS_0 + i_nzstop;
+        p_spu->i_start = VLC_TICK_0 + i_nzstart;
+        p_spu->i_stop = VLC_TICK_0 + i_nzstop;
         p_spu->b_ephemer  = true; /* !important */
         p_spu->b_absolute = false; /* can't be absolute as snap to lines can overlap ! */
 
@@ -2061,7 +2061,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
     if( p_block == NULL ) /* No Drain */
         return VLCDEC_SUCCESS;
 
-    vlc_tick_t i_nzstart = p_block->i_pts - VLC_TS_0;
+    vlc_tick_t i_nzstart = p_block->i_pts - VLC_TICK_0;
     vlc_tick_t i_nzstop = i_nzstart + p_block->i_length;
 
     if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY )
diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
index bf256cb7abbf9fbffe4b733bc1f778f1d2ac7bac..b11ed3bd788346c43ddee99238225edf62e93383 100644
--- a/modules/demux/adaptive/PlaylistManager.cpp
+++ b/modules/demux/adaptive/PlaylistManager.cpp
@@ -382,7 +382,7 @@ bool PlaylistManager::setPosition(vlc_tick_t mediatime, double pos, bool accurat
         ret = false;
     }
 
-    if(accurate && ret && streampos.times.continuous >= VLC_TS_0)
+    if(accurate && ret && streampos.times.continuous >= VLC_TICK_0)
     {
         es_out_Control(p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
                        streampos.times.continuous);
@@ -542,7 +542,7 @@ int PlaylistManager::doDemux(int64_t increment)
         if( demux.times.continuous != VLC_TICK_INVALID && barrier.continuous != demux.times.continuous )
         {
             demux.times = barrier;
-            vlc_tick_t pcr = VLC_TS_0 + std::max(INT64_C(0), demux.times.continuous - CLOCK_FREQ/10);
+            vlc_tick_t pcr = VLC_TICK_0 + std::max(INT64_C(0), demux.times.continuous - CLOCK_FREQ/10);
             es_out_Control(p_demux->out, ES_OUT_SET_GROUP_PCR, 0, pcr);
         }
         vlc_mutex_unlock(&demux.lock);
@@ -820,10 +820,10 @@ void PlaylistManager::updateControlsPosition()
             }
         }
 
-        if(cached.i_time > VLC_TS_0 + cached.playlistStart &&
-           cached.i_time <= VLC_TS_0 + cached.playlistEnd && cached.playlistLength)
+        if(cached.i_time > VLC_TICK_0 + cached.playlistStart &&
+           cached.i_time <= VLC_TICK_0 + cached.playlistEnd && cached.playlistLength)
         {
-            cached.f_position = ((double)(cached.i_time - VLC_TS_0 - cached.playlistStart)) / cached.playlistLength;
+            cached.f_position = ((double)(cached.i_time - VLC_TICK_0 - cached.playlistStart)) / cached.playlistLength;
         }
         else
         {
@@ -838,7 +838,7 @@ void PlaylistManager::updateControlsPosition()
         if(cached.playlistLength && currentTimes.segment.media != VLC_TICK_INVALID)
         {
             cached.i_time = currentTimes.segment.media;
-            cached.f_position = (double) (cached.i_time - VLC_TS_0 - cached.playlistStart) / cached.playlistLength;
+            cached.f_position = (double) (cached.i_time - VLC_TICK_0 - cached.playlistStart) / cached.playlistLength;
         }
         else
         {
diff --git a/modules/demux/adaptive/SegmentTracker.cpp b/modules/demux/adaptive/SegmentTracker.cpp
index 3e0e48ab607b5633b089594010857662533fa063..1ffae9e860fab290d5c0004d43f859a5cbd6adc7 100644
--- a/modules/demux/adaptive/SegmentTracker.cpp
+++ b/modules/demux/adaptive/SegmentTracker.cpp
@@ -330,7 +330,7 @@ SegmentTracker::prepareChunk(bool switch_allowed, Position pos) const
     vlc_tick_t displayTime = datasegment->getDisplayTime();
     /* timings belong to timeline and are not set on the segment or need profile timescale */
     if(pos.rep->getPlaybackTimeDurationBySegmentNumber(pos.number, &startTime, &duration))
-        startTime += VLC_TS_0;
+        startTime += VLC_TICK_0;
 
     return ChunkEntry(segmentChunk, pos, startTime, duration, displayTime);
 }
diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp
index 2687e578378b982e92f8093b9ec29fedce19c113..97c042a187e36daf4fb0215f7f2f071335d47a49 100644
--- a/modules/demux/adaptive/Streams.cpp
+++ b/modules/demux/adaptive/Streams.cpp
@@ -95,7 +95,7 @@ bool AbstractStream::init(const StreamFormat &format_, SegmentTracker *tracker)
                 segmentTracker->registerListener(this);
                 segmentTracker->notifyBufferingState(true);
                 if(mightalwaysstartfromzero)
-                    fakeesout->setExpectedTimestamp(VLC_TS_0 + segmentTracker->getPlaybackTime());
+                    fakeesout->setExpectedTimestamp(VLC_TICK_0 + segmentTracker->getPlaybackTime());
                 declaredCodecs();
                 return true;
             }
@@ -167,7 +167,7 @@ bool AbstractStream::resetForNewPosition(vlc_tick_t seekMediaTime)
         prevEndTimeContext = SegmentTimes();
         currentChunk = getNextChunk();
         if(mightalwaysstartfromzero)
-            fakeEsOut()->setExpectedTimestamp(VLC_TS_0 + seekMediaTime);
+            fakeEsOut()->setExpectedTimestamp(VLC_TICK_0 + seekMediaTime);
         if( !restartDemux() )
         {
             msg_Info(p_realdemux, "Restart demux failed");
@@ -708,7 +708,7 @@ bool AbstractStream::setPosition(const StreamPosition &pos, bool tryonly)
     {
 // in some cases, media time seek != sent dts
 //        es_out_Control(p_realdemux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
-//                       VLC_TS_0 + time);
+//                       VLC_TICK_0 + time);
     }
     return ret;
 }
diff --git a/modules/demux/adaptive/plumbing/Demuxer.cpp b/modules/demux/adaptive/plumbing/Demuxer.cpp
index 67c7b8e1f45757e260897cd7360fa147b7d870ba..e56a55db36b7e10b27702e2b8242716af0f877f6 100644
--- a/modules/demux/adaptive/plumbing/Demuxer.cpp
+++ b/modules/demux/adaptive/plumbing/Demuxer.cpp
@@ -193,7 +193,7 @@ bool SlaveDemuxer::create()
 AbstractDemuxer::Status SlaveDemuxer::demux(vlc_tick_t nz_deadline)
 {
     /* Always call with increment or buffering will get slow stuck */
-    vlc_tick_t i_next_demux_time = VLC_TS_0 + nz_deadline + CLOCK_FREQ / 4;
+    vlc_tick_t i_next_demux_time = VLC_TICK_0 + nz_deadline + CLOCK_FREQ / 4;
     if( demux_Control(p_demux, DEMUX_SET_NEXT_DEMUX_TIME, i_next_demux_time ) != VLC_SUCCESS )
     {
         b_eof = true;
diff --git a/modules/demux/adaptive/test/SegmentTracker.cpp b/modules/demux/adaptive/test/SegmentTracker.cpp
index d4c02648b8a9df1583deac778147b2ee0a60c2f1..8cdb387ffe871cc725c977ccfb06a385a7a58367 100644
--- a/modules/demux/adaptive/test/SegmentTracker.cpp
+++ b/modules/demux/adaptive/test/SegmentTracker.cpp
@@ -323,7 +323,7 @@ static int SegmentTracker_check_formats(BaseAdaptationSet *adaptSet,
         Expect(currentChunk);
         Expect(events.occured(TrackerEvent::Type::SegmentChange) == true);
         Expect(events.occured(TrackerEvent::Type::FormatChange) == true);
-        Expect(events.segmentchanged.starttime == timescale.ToTime(START) + VLC_TS_0);
+        Expect(events.segmentchanged.starttime == timescale.ToTime(START) + VLC_TICK_0);
         Expect(events.segmentchanged.duration == timescale.ToTime(100));
         Expect(events.segmentchanged.sequence == 456);
         Expect(events.formatchanged.format == StreamFormat::Type::PackedAAC);
@@ -333,7 +333,7 @@ static int SegmentTracker_check_formats(BaseAdaptationSet *adaptSet,
         events.reset();
         currentChunk = tracker->getNextChunk(true);
         Expect(currentChunk);
-        Expect(events.segmentchanged.starttime == timescale.ToTime(START + 100 * 1) + VLC_TS_0);
+        Expect(events.segmentchanged.starttime == timescale.ToTime(START + 100 * 1) + VLC_TICK_0);
         Expect(events.segmentchanged.duration == timescale.ToTime(100));
         Expect(events.occured(TrackerEvent::Type::FormatChange) == false);
         Expect(events.occured(TrackerEvent::Type::SegmentChange) == true);
@@ -343,7 +343,7 @@ static int SegmentTracker_check_formats(BaseAdaptationSet *adaptSet,
         events.reset();
         currentChunk = tracker->getNextChunk(true);
         Expect(currentChunk);
-        Expect(events.segmentchanged.starttime == timescale.ToTime(START + 100 * 2) + VLC_TS_0);
+        Expect(events.segmentchanged.starttime == timescale.ToTime(START + 100 * 2) + VLC_TICK_0);
         Expect(events.segmentchanged.duration == timescale.ToTime(100));
         Expect(events.occured(TrackerEvent::Type::FormatChange) == true);
         Expect(events.occured(TrackerEvent::Type::SegmentChange) == true);
@@ -403,12 +403,12 @@ static int SegmentTracker_check_seeks(BaseAdaptationSet *adaptSet,
         rep0->addAttribute(segmentList);
 
         events.reset();
-        Expect(tracker->setPositionByTime(VLC_TS_0 + timescale.ToTime(START + 250), false, true) == true);
+        Expect(tracker->setPositionByTime(VLC_TICK_0 + timescale.ToTime(START + 250), false, true) == true);
         Expect(events.occured(TrackerEvent::Type::PositionChange) == false);
         Expect(tracker->getPlaybackTime() == 0);
 
         events.reset();
-        Expect(tracker->setPositionByTime(VLC_TS_0 + timescale.ToTime(START + 250), false, false) == true);
+        Expect(tracker->setPositionByTime(VLC_TICK_0 + timescale.ToTime(START + 250), false, false) == true);
         currentChunk = tracker->getNextChunk(true);
         Expect(currentChunk);
         Expect(events.occured(TrackerEvent::Type::PositionChange) == true);
@@ -419,7 +419,7 @@ static int SegmentTracker_check_seeks(BaseAdaptationSet *adaptSet,
 
         /* past playlist, align to end */
         events.reset();
-        Expect(tracker->setPositionByTime(VLC_TS_0 + timescale.ToTime(START + 9999), false, false) == true);
+        Expect(tracker->setPositionByTime(VLC_TICK_0 + timescale.ToTime(START + 9999), false, false) == true);
         currentChunk = tracker->getNextChunk(true);
         Expect(currentChunk);
         Expect(events.occured(TrackerEvent::Type::PositionChange) == true);
@@ -427,8 +427,8 @@ static int SegmentTracker_check_seeks(BaseAdaptationSet *adaptSet,
         currentChunk = nullptr;
 
         /* out of playlist, we need to fail */
-        Expect(tracker->setPositionByTime(VLC_TS_0 + timescale.ToTime(START / 2), false, true) == false);
-        Expect(tracker->setPositionByTime(VLC_TS_0 + timescale.ToTime(START / 2), false, false) == false);
+        Expect(tracker->setPositionByTime(VLC_TICK_0 + timescale.ToTime(START / 2), false, true) == false);
+        Expect(tracker->setPositionByTime(VLC_TICK_0 + timescale.ToTime(START / 2), false, false) == false);
 
         /* restart playlist from startpos */
         events.reset();
@@ -445,7 +445,7 @@ static int SegmentTracker_check_seeks(BaseAdaptationSet *adaptSet,
 
         /* go to unaligned pos */
         events.reset();
-        Expect(tracker->setPositionByTime(VLC_TS_0 + timescale.ToTime(START + 250), false, false) == true);
+        Expect(tracker->setPositionByTime(VLC_TICK_0 + timescale.ToTime(START + 250), false, false) == true);
         currentChunk = tracker->getNextChunk(true);
         Expect(currentChunk);
         Expect(events.occured(TrackerEvent::Type::PositionChange) == true);
@@ -562,7 +562,7 @@ static int SegmentTracker_check_switches(BaseAdaptationSet *adaptSet,
         Expect(events.representationchanged.next == rep1);
         /* check returned init */
         Expect(currentChunk->getContentType() == "sample/aacinit");
-        Expect(events.segmentchanged.starttime == timescale.ToTime(START + 100 * 2) + VLC_TS_0);
+        Expect(events.segmentchanged.starttime == timescale.ToTime(START + 100 * 2) + VLC_TICK_0);
         Expect(events.segmentchanged.duration == timescale.ToTime(100));
         Expect(events.segmentchanged.sequence == 456);
         delete currentChunk;
@@ -575,7 +575,7 @@ static int SegmentTracker_check_switches(BaseAdaptationSet *adaptSet,
         Expect(events.occured(TrackerEvent::Type::RepresentationSwitch) == false);
         Expect(currentChunk->getContentType() == "sample/aac");
         /* time should remain the same */
-        Expect(events.segmentchanged.starttime == timescale.ToTime(START + 100 * 2) + VLC_TS_0);
+        Expect(events.segmentchanged.starttime == timescale.ToTime(START + 100 * 2) + VLC_TICK_0);
         Expect(events.segmentchanged.duration == timescale.ToTime(100));
         Expect(events.segmentchanged.sequence == 456);
         delete currentChunk;
@@ -704,7 +704,7 @@ static int SegmentTracker_check_HLSseeks(BaseAdaptationSet *adaptSet,
         rep1->addAttribute(segmentList);
 
         /* on rep0 */
-        Expect(tracker->setPositionByTime(VLC_TS_0 + timescale.ToTime(START + 300), false, false) == true);
+        Expect(tracker->setPositionByTime(VLC_TICK_0 + timescale.ToTime(START + 300), false, false) == true);
         currentChunk = tracker->getNextChunk(true);
         Expect(currentChunk);
         Expect(events.occured(TrackerEvent::Type::PositionChange) == true);
diff --git a/modules/demux/adaptive/test/playlist/M3U8.cpp b/modules/demux/adaptive/test/playlist/M3U8.cpp
index 58504330343d55310690a699a8e8326efe5fc080..d76b892fe2bdb1e7227f6ef2aa37339f4e4ac11e 100644
--- a/modules/demux/adaptive/test/playlist/M3U8.cpp
+++ b/modules/demux/adaptive/test/playlist/M3U8.cpp
@@ -450,15 +450,15 @@ int M3U8Playlist_test()
         /* date set and incremented */
         seg = rep->getMediaSegment(10);
         Expect(seg);
-        Expect(static_cast<HLSSegment *>(seg)->getDisplayTime() == VLC_TS_0 + vlc_tick_from_sec(10));
+        Expect(static_cast<HLSSegment *>(seg)->getDisplayTime() == VLC_TICK_0 + vlc_tick_from_sec(10));
         seg = rep->getMediaSegment(11);
         Expect(seg);
-        Expect(static_cast<HLSSegment *>(seg)->getDisplayTime() == VLC_TS_0 + vlc_tick_from_sec(10 + 8));
+        Expect(static_cast<HLSSegment *>(seg)->getDisplayTime() == VLC_TICK_0 + vlc_tick_from_sec(10 + 8));
 
         /* date change after discontinuity */
         seg = rep->getMediaSegment(20);
         Expect(seg);
-        Expect(static_cast<HLSSegment *>(seg)->getDisplayTime() == VLC_TS_0 + vlc_tick_from_sec(7200));
+        Expect(static_cast<HLSSegment *>(seg)->getDisplayTime() == VLC_TICK_0 + vlc_tick_from_sec(7200));
 
         vlc_tick_t begin, end, duration;
         Expect(rep->getMediaPlaybackRange(&begin, &end, &duration));
diff --git a/modules/demux/adaptive/test/plumbing/CommandsQueue.cpp b/modules/demux/adaptive/test/plumbing/CommandsQueue.cpp
index e3eda309d649734528d837294a2eee46c4a648c2..02a683e9c0e8e5fe8e2c5e6bcbe22810f871d0ec 100644
--- a/modules/demux/adaptive/test/plumbing/CommandsQueue.cpp
+++ b/modules/demux/adaptive/test/plumbing/CommandsQueue.cpp
@@ -108,7 +108,7 @@ int CommandsQueue_test()
         Expect(queue.isEOF() == false);
         Expect(queue.isDraining() == false);
         Expect(queue.isEmpty() == true);
-        Expect(queue.getDemuxedAmount(DT(VLC_TS_0)).continuous == 0);
+        Expect(queue.getDemuxedAmount(DT(VLC_TICK_0)).continuous == 0);
         Expect(queue.getBufferingLevel().continuous == VLC_TICK_INVALID);
         Expect(queue.getFirstTimes().continuous == VLC_TICK_INVALID);
         Expect(queue.getPCR().continuous == VLC_TICK_INVALID);
@@ -125,7 +125,7 @@ int CommandsQueue_test()
         Expect(queue.isEOF() == false);
         Expect(queue.isDraining() == false);
         Expect(queue.isEmpty() == true);
-        Expect(queue.getDemuxedAmount(DT(VLC_TS_0)).continuous == 0);
+        Expect(queue.getDemuxedAmount(DT(VLC_TICK_0)).continuous == 0);
         Expect(queue.getBufferingLevel().continuous == VLC_TICK_INVALID);
         Expect(queue.getPCR().continuous == std::numeric_limits<mtime_t>::max());
 
@@ -137,34 +137,34 @@ int CommandsQueue_test()
         {
             block_t *data = block_Alloc(0);
             Expect(data);
-            data->i_dts = VLC_TS_0 + vlc_tick_from_sec(i);
+            data->i_dts = VLC_TICK_0 + vlc_tick_from_sec(i);
             cmd = factory.createEsOutSendCommand(id0, SegmentTimes(), data);
             queue.Schedule(cmd);
         }
         Expect(queue.getPCR().continuous == VLC_TICK_INVALID);
         Expect(queue.getFirstTimes().continuous == VLC_TICK_INVALID);
-        Expect(queue.getDemuxedAmount(DT(VLC_TS_0)).continuous == 0);
+        Expect(queue.getDemuxedAmount(DT(VLC_TICK_0)).continuous == 0);
         Expect(queue.getBufferingLevel().continuous == VLC_TICK_INVALID);
         /* commit some */
-        cmd = factory.createEsOutControlPCRCommand(0, SegmentTimes(), VLC_TS_0 + vlc_tick_from_sec(8));
+        cmd = factory.createEsOutControlPCRCommand(0, SegmentTimes(), VLC_TICK_0 + vlc_tick_from_sec(8));
         queue.Schedule(cmd);
-        Expect(queue.getDemuxedAmount(DT(VLC_TS_0)).continuous == vlc_tick_from_sec(8)); /* PCR committed data up to 8s */
-        Expect(queue.getBufferingLevel().continuous == VLC_TS_0 + vlc_tick_from_sec(8));
-        Expect(queue.getDemuxedAmount(DT(VLC_TS_0 + vlc_tick_from_sec(8))).continuous == 0);
-        Expect(queue.getDemuxedAmount(DT(VLC_TS_0 + vlc_tick_from_sec(7))).continuous == vlc_tick_from_sec(1));
+        Expect(queue.getDemuxedAmount(DT(VLC_TICK_0)).continuous == vlc_tick_from_sec(8)); /* PCR committed data up to 8s */
+        Expect(queue.getBufferingLevel().continuous == VLC_TICK_0 + vlc_tick_from_sec(8));
+        Expect(queue.getDemuxedAmount(DT(VLC_TICK_0 + vlc_tick_from_sec(8))).continuous == 0);
+        Expect(queue.getDemuxedAmount(DT(VLC_TICK_0 + vlc_tick_from_sec(7))).continuous == vlc_tick_from_sec(1));
         Expect(queue.getPCR().continuous == VLC_TICK_INVALID);
         /* extend through PCR */
-        cmd = factory.createEsOutControlPCRCommand(0, SegmentTimes(), VLC_TS_0 + vlc_tick_from_sec(10));
+        cmd = factory.createEsOutControlPCRCommand(0, SegmentTimes(), VLC_TICK_0 + vlc_tick_from_sec(10));
         queue.Schedule(cmd);
-        Expect(queue.getBufferingLevel().continuous == VLC_TS_0 + vlc_tick_from_sec(10));
-        Expect(queue.getDemuxedAmount(DT(VLC_TS_0)).continuous == vlc_tick_from_sec(10));
+        Expect(queue.getBufferingLevel().continuous == VLC_TICK_0 + vlc_tick_from_sec(10));
+        Expect(queue.getDemuxedAmount(DT(VLC_TICK_0)).continuous == vlc_tick_from_sec(10));
 
         /* dequeue */
-        queue.Process(Times(SegmentTimes(), VLC_TS_0 + vlc_tick_from_sec(3)));
-        Expect(queue.getPCR().continuous == VLC_TS_0 + vlc_tick_from_sec(3));
-        Expect(queue.getFirstTimes().continuous == VLC_TS_0 + vlc_tick_from_sec(3));
-        Expect(queue.getDemuxedAmount(DT(VLC_TS_0 + vlc_tick_from_sec(3))).continuous == vlc_tick_from_sec(7));
-        Expect(queue.getDemuxedAmount(DT(VLC_TS_0 + vlc_tick_from_sec(4))).continuous == vlc_tick_from_sec(6));
+        queue.Process(Times(SegmentTimes(), VLC_TICK_0 + vlc_tick_from_sec(3)));
+        Expect(queue.getPCR().continuous == VLC_TICK_0 + vlc_tick_from_sec(3));
+        Expect(queue.getFirstTimes().continuous == VLC_TICK_0 + vlc_tick_from_sec(3));
+        Expect(queue.getDemuxedAmount(DT(VLC_TICK_0 + vlc_tick_from_sec(3))).continuous == vlc_tick_from_sec(7));
+        Expect(queue.getDemuxedAmount(DT(VLC_TICK_0 + vlc_tick_from_sec(4))).continuous == vlc_tick_from_sec(6));
 
         /* drop */
         queue.setDrop(true);
@@ -172,21 +172,21 @@ int CommandsQueue_test()
         {
             block_t *data = block_Alloc(0);
             Expect(data);
-            data->i_dts = VLC_TS_0 + vlc_tick_from_sec(11);
+            data->i_dts = VLC_TICK_0 + vlc_tick_from_sec(11);
             cmd = factory.createEsOutSendCommand(id0, SegmentTimes(), data);
             queue.Schedule(cmd);
         } while(0);
-        cmd = factory.createEsOutControlPCRCommand(0, SegmentTimes(), VLC_TS_0 + vlc_tick_from_sec(11));
+        cmd = factory.createEsOutControlPCRCommand(0, SegmentTimes(), VLC_TICK_0 + vlc_tick_from_sec(11));
         queue.Schedule(cmd);
-        Expect(queue.getPCR().continuous == VLC_TS_0 + vlc_tick_from_sec(3)); /* should be unchanged */
-        Expect(queue.getDemuxedAmount(DT(VLC_TS_0 + vlc_tick_from_sec(3))).continuous == vlc_tick_from_sec(7));
+        Expect(queue.getPCR().continuous == VLC_TICK_0 + vlc_tick_from_sec(3)); /* should be unchanged */
+        Expect(queue.getDemuxedAmount(DT(VLC_TICK_0 + vlc_tick_from_sec(3))).continuous == vlc_tick_from_sec(7));
         queue.setDrop(false);
 
         /* empty */
-        Expect(queue.getPCR().continuous == VLC_TS_0 + vlc_tick_from_sec(3));
-        queue.Process(DT(VLC_TS_0 + vlc_tick_from_sec(13)));
+        Expect(queue.getPCR().continuous == VLC_TICK_0 + vlc_tick_from_sec(3));
+        queue.Process(DT(VLC_TICK_0 + vlc_tick_from_sec(13)));
         Expect(queue.isEmpty());
-        Expect(queue.getPCR().continuous == VLC_TS_0 + vlc_tick_from_sec(9));
+        Expect(queue.getPCR().continuous == VLC_TICK_0 + vlc_tick_from_sec(9));
 
         queue.Abort(true);
         esout.cleanup();
@@ -201,23 +201,23 @@ int CommandsQueue_test()
             {
                 block_t *data = block_Alloc(0);
                 Expect(data);
-                data->i_dts = VLC_TS_0 + OFFSET + vlc_tick_from_sec(i);
+                data->i_dts = VLC_TICK_0 + OFFSET + vlc_tick_from_sec(i);
                 cmd = factory.createEsOutSendCommand(id, SegmentTimes(), data);
                 queue.Schedule(cmd);
             }
         }
 
         cmd = factory.createEsOutControlPCRCommand(0, SegmentTimes(),
-                                                   VLC_TS_0 + OFFSET + vlc_tick_from_sec(10));
+                                                   VLC_TICK_0 + OFFSET + vlc_tick_from_sec(10));
         queue.Schedule(cmd);
         Expect(esout.output.empty());
-        queue.Process(DT(VLC_TS_0 + OFFSET - 1));
+        queue.Process(DT(VLC_TICK_0 + OFFSET - 1));
         Expect(esout.output.empty());
-        queue.Process(DT(VLC_TS_0 + OFFSET + vlc_tick_from_sec(10)));
+        queue.Process(DT(VLC_TICK_0 + OFFSET + vlc_tick_from_sec(10)));
         Expect(esout.output.size() == 10);
         for(size_t i=0; i<5; i++)
         {
-            const vlc_tick_t now = VLC_TS_0 + OFFSET + vlc_tick_from_sec(i);
+            const vlc_tick_t now = VLC_TICK_0 + OFFSET + vlc_tick_from_sec(i);
             OutputVal val = esout.output.front();
             Expect(val.first == id0);
             Expect(val.second->i_dts == now);
@@ -242,13 +242,13 @@ int CommandsQueue_test()
                 {
                     block_t *data = block_Alloc(0);
                     Expect(data);
-                    data->i_dts = VLC_TS_0 + OFFSET + vlc_tick_from_sec(k * 2 + i);
+                    data->i_dts = VLC_TICK_0 + OFFSET + vlc_tick_from_sec(k * 2 + i);
                     cmd = factory.createEsOutSendCommand(id, SegmentTimes(), data);
                     queue.Schedule(cmd);
                 }
             }
             cmd = factory.createEsOutControlPCRCommand(0, SegmentTimes(),
-                    VLC_TS_0 + OFFSET + vlc_tick_from_sec( (k*2)+1 ));
+                    VLC_TICK_0 + OFFSET + vlc_tick_from_sec( (k*2)+1 ));
             queue.Schedule(cmd);
         }
         queue.Process(Times(SegmentTimes(), std::numeric_limits<mtime_t>::max()));
@@ -256,7 +256,7 @@ int CommandsQueue_test()
         for(size_t i=0; i<12; i++)
         {
             TestEsOutID *id = (i % 2) ? id1 : id0;
-            const vlc_tick_t now = VLC_TS_0 + OFFSET + vlc_tick_from_sec(i / 2);
+            const vlc_tick_t now = VLC_TICK_0 + OFFSET + vlc_tick_from_sec(i / 2);
             OutputVal &val = esout.output.front();
             Expect(val.first == id);
             Expect(val.second->i_dts == now);
@@ -277,13 +277,13 @@ int CommandsQueue_test()
                     block_t *data = block_Alloc(0);
                     Expect(data);
                     if(i==0)
-                        data->i_dts = VLC_TS_0 + OFFSET + vlc_tick_from_sec(k);
+                        data->i_dts = VLC_TICK_0 + OFFSET + vlc_tick_from_sec(k);
                     cmd = factory.createEsOutSendCommand(id, SegmentTimes(), data);
                     queue.Schedule(cmd);
                 }
             }
             cmd = factory.createEsOutControlPCRCommand(0, SegmentTimes(),
-                    VLC_TS_0 + OFFSET + vlc_tick_from_sec(k));
+                    VLC_TICK_0 + OFFSET + vlc_tick_from_sec(k));
             queue.Schedule(cmd);
         }
         queue.Process(Times(SegmentTimes(), std::numeric_limits<mtime_t>::max()));
@@ -291,7 +291,7 @@ int CommandsQueue_test()
         for(size_t i=0; i<6; i++)
         {
             TestEsOutID *id = (i % 2) ? id1 : id0;
-            const vlc_tick_t now = VLC_TS_0 + OFFSET + vlc_tick_from_sec(i/2);
+            const vlc_tick_t now = VLC_TICK_0 + OFFSET + vlc_tick_from_sec(i/2);
             OutputVal val = esout.output.front();
             Expect(val.first == id);
             Expect(val.second->i_dts == now);
@@ -309,7 +309,7 @@ int CommandsQueue_test()
         /* reordering PCR before PTS */
         for(size_t i=0; i<2; i++)
         {
-            const vlc_tick_t now = VLC_TS_0 + OFFSET + vlc_tick_from_sec(i);
+            const vlc_tick_t now = VLC_TICK_0 + OFFSET + vlc_tick_from_sec(i);
             cmd = factory.createEsOutControlPCRCommand(0, SegmentTimes(), now);
             queue.Schedule(cmd);
             block_t *data = block_Alloc(0);
@@ -318,7 +318,7 @@ int CommandsQueue_test()
             cmd = factory.createEsOutSendCommand(id0, SegmentTimes(), data);
             queue.Schedule(cmd);
         }
-        queue.Process(DT(VLC_TS_0 + OFFSET + vlc_tick_from_sec(0)));
+        queue.Process(DT(VLC_TICK_0 + OFFSET + vlc_tick_from_sec(0)));
         Expect(esout.output.size() == 1);
 
     } catch(...) {
diff --git a/modules/demux/adaptive/test/plumbing/FakeEsOut.cpp b/modules/demux/adaptive/test/plumbing/FakeEsOut.cpp
index 505de072908b55244f162e805f9da4d1afefcaf0..79af076c6b1df0e958525ed3269fadc332f19377 100644
--- a/modules/demux/adaptive/test/plumbing/FakeEsOut.cpp
+++ b/modules/demux/adaptive/test/plumbing/FakeEsOut.cpp
@@ -110,7 +110,7 @@ static void enqueue(es_out_t *out, es_out_id_t *id, vlc_tick_t dts, vlc_tick_t p
 }
 
 #define DMS(t) ((t)*INT64_C(1000))
-#define TMS(t) (VLC_TS_0 + DMS(t))
+#define TMS(t) (VLC_TICK_0 + DMS(t))
 #define SEND(t) enqueue(out, id, t, t)
 #define PCR(t) es_out_SetPCR(out, t)
 #define FROM_MPEGTS(x) (INT64_C(x) * 100 / 9)
@@ -241,7 +241,7 @@ static int check1(es_out_t *out, struct context *ctx, FakeESOut *fakees)
         Expect(ts == reference + DMS(1000));
 
         /* Reference has local multiple rolled timestamp < multiple rolled ts */
-        reference = VLC_TS_0 + FROM_MPEGTS(0x1FFFFFFFF) * 2;
+        reference = VLC_TICK_0 + FROM_MPEGTS(0x1FFFFFFFF) * 2;
         fakees->resetTimestamps();
         fakees->setSegmentStartTimes(segmentTimes);
         fakees->setSynchronizationReference(SynchronizationReference());
@@ -254,34 +254,34 @@ static int check1(es_out_t *out, struct context *ctx, FakeESOut *fakees)
 
 
         /* Reference has local timestamp rolled > ts */
-        reference = VLC_TS_0 + FROM_MPEGTS(0x1FFFFFFFF);
+        reference = VLC_TICK_0 + FROM_MPEGTS(0x1FFFFFFFF);
         fakees->resetTimestamps();
         fakees->setSegmentStartTimes(segmentTimes);
         fakees->setSynchronizationReference(SynchronizationReference());
         SEND(reference);
         PCR(reference);
         Expect(fakees->commandsQueue()->getBufferingLevel().continuous == reference);
-        ts = VLC_TS_0 + 1;
+        ts = VLC_TICK_0 + 1;
         ts = fakees->applyTimestampContinuity(ts);
         fprintf(stderr, "timestamp %ld\n", ts);
         Expect(ts == reference + 1);
 
         /* Reference has local timestamp mutiple rolled > multiple rolled ts */
-        reference = VLC_TS_0 + FROM_MPEGTS(0x1FFFFFFFF) * 5;
+        reference = VLC_TICK_0 + FROM_MPEGTS(0x1FFFFFFFF) * 5;
         fakees->resetTimestamps();
         fakees->setSegmentStartTimes(segmentTimes);
         fakees->setSynchronizationReference(SynchronizationReference());
         SEND(reference);
         PCR(reference);
         Expect(fakees->commandsQueue()->getBufferingLevel().continuous == reference);
-        ts = VLC_TS_0 + 1 + FROM_MPEGTS(0x1FFFFFFFF) * 2;
+        ts = VLC_TICK_0 + 1 + FROM_MPEGTS(0x1FFFFFFFF) * 2;
         ts = fakees->applyTimestampContinuity(ts);
         fprintf(stderr, "timestamp %ld\n", ts);
         Expect(ts == reference + 1);
 
         /* Do not trigger unwanted roll on long playbacks due to
          * initial reference value */
-        reference = VLC_TS_0 + FROM_MPEGTS(0x00000FFFF);
+        reference = VLC_TICK_0 + FROM_MPEGTS(0x00000FFFF);
         fakees->resetTimestamps();
         fakees->setSegmentStartTimes(segmentTimes);
         fakees->setSynchronizationReference(SynchronizationReference());
@@ -301,7 +301,7 @@ static int check1(es_out_t *out, struct context *ctx, FakeESOut *fakees)
         SEND(ts);
         PCR(ts);
         fakees->commandsQueue()->Process(drainTimes);
-        ts = VLC_TS_0 + 100; /* next ts has rolled */
+        ts = VLC_TICK_0 + 100; /* next ts has rolled */
         SEND(ts);
         PCR(ts);
         fakees->commandsQueue()->Process(drainTimes);
diff --git a/modules/demux/aiff.c b/modules/demux/aiff.c
index e87d2160982e46a316e554092a2b97d432ef3831..067f6cb275adc1b69d5d9ff2d80128952f20b8ac 100644
--- a/modules/demux/aiff.c
+++ b/modules/demux/aiff.c
@@ -247,7 +247,7 @@ static int Demux( demux_t *p_demux )
     }
 
     /* Set PCR */
-    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time);
+    es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_time);
 
     /* we will read 100ms at once */
     i_read = p_sys->i_ssnd_fsize * ( p_sys->fmt.audio.i_rate / 10 );
@@ -261,7 +261,7 @@ static int Demux( demux_t *p_demux )
     }
 
     p_block->i_dts =
-    p_block->i_pts = VLC_TS_0 + p_sys->i_time;
+    p_block->i_pts = VLC_TICK_0 + p_sys->i_time;
 
     p_sys->i_time += (int64_t)1000000 *
                      p_block->i_buffer /
diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 4e389ed04e8c0e5d20fd4bd35f6ddb88080029bc..8ea61dab766f6447cf3a483467f9f616f0a424f5 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -390,7 +390,7 @@ static int SeekIndex( demux_t *p_demux, vlc_tick_t i_date, float f_pos )
 
     if ( vlc_stream_Seek( p_demux->s, i_offset + p_sys->i_data_begin ) == VLC_SUCCESS )
     {
-        es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TS_0 + i_date );
+        es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TICK_0 + i_date );
         return VLC_SUCCESS;
     }
     else return VLC_EGENERIC;
@@ -593,7 +593,7 @@ static void Packet_SetAR( asf_packet_sys_t *p_packetsys, uint8_t i_stream_number
 
 static void Packet_SetSendTime( asf_packet_sys_t *p_packetsys, vlc_tick_t i_time )
 {
-    p_packetsys->p_demux->p_sys->i_sendtime = VLC_TS_0 + i_time;
+    p_packetsys->p_demux->p_sys->i_sendtime = VLC_TICK_0 + i_time;
 }
 
 static void Packet_UpdateTime( asf_packet_sys_t *p_packetsys, uint8_t i_stream_number,
@@ -601,7 +601,7 @@ static void Packet_UpdateTime( asf_packet_sys_t *p_packetsys, uint8_t i_stream_n
 {
     asf_track_t *tk = p_packetsys->p_demux->p_sys->track[i_stream_number];
     if ( tk )
-        tk->i_time = VLC_TS_0 + i_time;
+        tk->i_time = VLC_TICK_0 + i_time;
 }
 
 static asf_track_info_t * Packet_GetTrackInfo( asf_packet_sys_t *p_packetsys,
diff --git a/modules/demux/asf/asfpacket.c b/modules/demux/asf/asfpacket.c
index c93957a9d6192cda28af86aa957698fc1e494da5..6352a8215111de445cc8ceba41a174e0684db0a1 100644
--- a/modules/demux/asf/asfpacket.c
+++ b/modules/demux/asf/asfpacket.c
@@ -93,8 +93,8 @@ static int DemuxSubPayload( asf_packet_sys_t *p_packetsys,
         return -1;
     }
 
-    p_frag->i_pts = (b_ignore_pts) ? VLC_TICK_INVALID : VLC_TS_0 + i_pts;
-    p_frag->i_dts = VLC_TS_0 + i_dts;
+    p_frag->i_pts = (b_ignore_pts) ? VLC_TICK_INVALID : VLC_TICK_0 + i_pts;
+    p_frag->i_dts = VLC_TICK_0 + i_dts;
     if ( b_keyframe )
         p_frag->i_flags |= BLOCK_FLAG_TYPE_I;
 
diff --git a/modules/demux/au.c b/modules/demux/au.c
index 28acbe33f57ed30e8544600dfec2aeecb294049c..d2cc2d50fb322f1ea2a8e5bd430d82ef6d066889 100644
--- a/modules/demux/au.c
+++ b/modules/demux/au.c
@@ -312,7 +312,7 @@ static int Demux( demux_t *p_demux )
     block_t     *p_block;
 
     /* set PCR */
-    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time );
+    es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_time );
 
     p_block = vlc_stream_Block( p_demux->s, p_sys->i_frame_size );
     if( p_block == NULL )
@@ -322,7 +322,7 @@ static int Demux( demux_t *p_demux )
     }
 
     p_block->i_dts =
-    p_block->i_pts = VLC_TS_0 + p_sys->i_time;
+    p_block->i_pts = VLC_TICK_0 + p_sys->i_time;
 
     es_out_Send( p_demux->out, p_sys->es, p_block );
 
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 5075257137c8a765d6a18741c6c9a6d490cd6352..5a9e0a8156ef60f1bfeb5bb32ab6b47513681345 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -828,7 +828,7 @@ static int Demux( demux_t *p_demux )
         p_frame->i_dts = q.quot * CLOCK_FREQ *
             p_stream->time_base.num + q.rem * CLOCK_FREQ *
             p_stream->time_base.num /
-            p_stream->time_base.den - i_start_time + VLC_TS_0;
+            p_stream->time_base.den - i_start_time + VLC_TICK_0;
     }
 
     if( pkt.pts == (int64_t)AV_NOPTS_VALUE )
@@ -839,7 +839,7 @@ static int Demux( demux_t *p_demux )
         p_frame->i_pts = q.quot * CLOCK_FREQ *
             p_stream->time_base.num + q.rem * CLOCK_FREQ *
             p_stream->time_base.num /
-            p_stream->time_base.den - i_start_time + VLC_TS_0;
+            p_stream->time_base.den - i_start_time + VLC_TICK_0;
     }
     if( pkt.duration > 0 && p_frame->i_length <= 0 )
         p_frame->i_length = pkt.duration * CLOCK_FREQ *
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index fc03ea30effd86f9f60a9d28496fbccccd7168c0..dc605682c1f58f97b247547f85c842a05376c226 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -1160,7 +1160,7 @@ static int Demux_Seekable( demux_t *p_demux )
     }
 
     /* wait for the good time */
-    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time );
+    es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_time );
     p_sys->i_time += p_sys->i_read_increment;
 
     /* init toread */
@@ -1380,7 +1380,7 @@ static int Demux_Seekable( demux_t *p_demux )
             continue;
         }
 
-        p_frame->i_pts = VLC_TS_0 + AVI_GetPTS( tk );
+        p_frame->i_pts = VLC_TICK_0 + AVI_GetPTS( tk );
         if( tk->idx.p_entry[tk->i_idxposc].i_flags&AVIIF_KEYFRAME )
         {
             p_frame->i_flags = BLOCK_FLAG_TYPE_I;
@@ -1450,7 +1450,7 @@ static int Demux_UnSeekable( demux_t *p_demux )
     unsigned int i_stream;
     unsigned int i_packet;
 
-    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time );
+    es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_time );
 
     /* *** find master stream for data packet skipping algo *** */
     /* *** -> first video, if any, or first audio ES *** */
@@ -1550,7 +1550,7 @@ static int Demux_UnSeekable( demux_t *p_demux )
                 {
                     return VLC_DEMUXER_EGENERIC;
                 }
-                p_frame->i_pts = VLC_TS_0 + AVI_GetPTS( p_stream );
+                p_frame->i_pts = VLC_TICK_0 + AVI_GetPTS( p_stream );
 
                 AVI_SendFrame( p_demux, p_stream, p_frame );
             }
@@ -1716,9 +1716,9 @@ static int Seek( demux_t *p_demux, vlc_tick_t i_date, int i_percent, bool b_accu
             }
         }
         p_sys->i_time = i_start;
-        es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_time );
+        es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_time );
         if( b_accurate )
-            es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TS_0 + i_date );
+            es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TICK_0 + i_date );
         msg_Dbg( p_demux, "seek: %"PRId64" seconds", p_sys->i_time /CLOCK_FREQ );
         return VLC_SUCCESS;
 
diff --git a/modules/demux/caf.c b/modules/demux/caf.c
index 68efd3c7e8c05e01d9dc95bce48d516d4677f154..f6fd383658b6dc87961ef964b17c0690ead2c8aa 100644
--- a/modules/demux/caf.c
+++ b/modules/demux/caf.c
@@ -335,7 +335,7 @@ static inline vlc_tick_t FrameSpanGetTime( frame_span_t *span, uint32_t i_sample
     if( !i_sample_rate )
         return VLC_TICK_INVALID;
 
-    return ( span->i_samples * CLOCK_FREQ ) / i_sample_rate + VLC_TS_0;
+    return ( span->i_samples * CLOCK_FREQ ) / i_sample_rate + VLC_TICK_0;
 }
 
 /* SetSpanWithSample returns the span from the beginning of the file up to and
diff --git a/modules/demux/dirac.c b/modules/demux/dirac.c
index 65730a98bc1b04a99ef90726c2ab073e04745595..ec63e42192019c7e4da38ec01c044dbfc3c76378 100644
--- a/modules/demux/dirac.c
+++ b/modules/demux/dirac.c
@@ -179,7 +179,7 @@ static int Demux( demux_t *p_demux)
             p_sys->i_state++;
             /* by default, timestamps are invalid.
              * Except when we need an anchor point */
-            p_block_in->i_dts = VLC_TS_0;
+            p_block_in->i_dts = VLC_TICK_0;
         }
     }
 
diff --git a/modules/demux/flac.c b/modules/demux/flac.c
index 9c2f33cab27418c85c4f75025f983847e5f28acc..cb6c0e6e0c9d3de460d87f33abe1095fa649b4dd 100644
--- a/modules/demux/flac.c
+++ b/modules/demux/flac.c
@@ -372,7 +372,7 @@ static int Demux( demux_t *p_demux )
         p_sys->p_current_block->i_flags = p_sys->i_next_block_flags;
         p_sys->i_next_block_flags = 0;
         p_sys->p_current_block->i_pts =
-        p_sys->p_current_block->i_dts = p_sys->b_start ? VLC_TS_0 : VLC_TICK_INVALID;
+        p_sys->p_current_block->i_dts = p_sys->b_start ? VLC_TICK_0 : VLC_TICK_INVALID;
     }
 
     while( (p_block_out = GetPacketizedBlock( p_sys->p_packetizer,
@@ -389,7 +389,7 @@ static int Demux( demux_t *p_demux )
 
             /* set PCR */
             if( unlikely(p_sys->i_pts == VLC_TICK_INVALID) )
-                es_out_SetPCR( p_demux->out, __MAX(p_block_out->i_dts - 1, VLC_TS_0) );
+                es_out_SetPCR( p_demux->out, __MAX(p_block_out->i_dts - 1, VLC_TICK_0) );
 
             p_sys->i_pts = p_block_out->i_dts;
 
diff --git a/modules/demux/gme.c b/modules/demux/gme.c
index b144ca6c056a110d2350a56d9a35584ca603532f..14b36155abc77b10365f6593a55883bdd6ba5621 100644
--- a/modules/demux/gme.c
+++ b/modules/demux/gme.c
@@ -228,7 +228,7 @@ static int Demux (demux_t *demux)
         return 0;
     }
 
-    block->i_pts = block->i_dts = VLC_TS_0 + date_Get (&sys->pts);
+    block->i_pts = block->i_dts = VLC_TICK_0 + date_Get (&sys->pts);
     es_out_SetPCR (demux->out, block->i_pts);
     es_out_Send (demux->out, sys->es, block);
     date_Increment (&sys->pts, SAMPLES);
diff --git a/modules/demux/hls/HLSStreams.cpp b/modules/demux/hls/HLSStreams.cpp
index 1dde1343ce20454e1b7521e507bd50087c5f5887..beb802ccacb564c2972ad5704c21a3416bdb7829 100644
--- a/modules/demux/hls/HLSStreams.cpp
+++ b/modules/demux/hls/HLSStreams.cpp
@@ -168,7 +168,7 @@ block_t * HLSStream::checkBlock(block_t *p_block, bool b_first)
                 if(mpegts != std::numeric_limits<uint64_t>::max() &&
                    local != std::numeric_limits<mtime_t>::max())
                 {
-                    setMetadataTimeMapping(VLC_TS_0 + mpegts * 100/9, VLC_TS_0 + local);
+                    setMetadataTimeMapping(VLC_TICK_0 + mpegts * 100/9, VLC_TICK_0 + local);
                 }
             }
         }
diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp
index 2b2117b88d615b25e3b2b60ce410f80596a57317..73fe55b397a206afc21ef18f194790dac2d31e54 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -390,7 +390,7 @@ void M3U8Parser::parseSegments(vlc_object_t *, HLSRepresentation *rep, const std
                 break;
 
             case SingleValueTag::EXTXPROGRAMDATETIME:
-                absReferenceTime = VLC_TS_0 +
+                absReferenceTime = VLC_TICK_0 +
                         UTCTime(static_cast<const SingleValueTag *>(tag)->getValue().value).mtime();
                 /* Reverse apply UTC timespec from first discont */
                 if(segmentstoappend.size() && segmentstoappend.back()->getDisplayTime() == VLC_TICK_INVALID)
@@ -399,10 +399,10 @@ void M3U8Parser::parseSegments(vlc_object_t *, HLSRepresentation *rep, const std
                     for(auto it = segmentstoappend.crbegin(); it != segmentstoappend.crend(); ++it)
                     {
                         vlc_tick_t duration = timescale.ToTime((*it)->duration.Get());
-                        if( duration < tempTime - VLC_TS_0 )
+                        if( duration < tempTime - VLC_TICK_0 )
                             tempTime -= duration;
                         else
-                            tempTime = VLC_TS_0;
+                            tempTime = VLC_TICK_0;
                         (*it)->setDisplayTime(tempTime);
                     }
                 }
diff --git a/modules/demux/image.c b/modules/demux/image.c
index ca582a9f9cedc0eebbc12cb8bb8c4dc53f089185..ecf8992e6dc6f0503a7d247d38d85b30fe0635fe 100644
--- a/modules/demux/image.c
+++ b/modules/demux/image.c
@@ -220,7 +220,7 @@ static int Demux(demux_t *demux)
             return -1;
 
         data->i_dts =
-        data->i_pts = VLC_TS_0 + pts;
+        data->i_pts = VLC_TICK_0 + pts;
         es_out_SetPCR(demux->out, data->i_pts);
         es_out_Send(demux->out, sys->es, data);
 
@@ -264,7 +264,7 @@ static int Control(demux_t *demux, int query, va_list args)
         return VLC_SUCCESS;
     }
     case DEMUX_SET_NEXT_DEMUX_TIME: {
-        int64_t pts_next = VLC_TS_0 + va_arg(args, int64_t);
+        int64_t pts_next = VLC_TICK_0 + va_arg(args, int64_t);
         if (sys->pts_next <= VLC_TICK_INVALID)
             sys->pts_origin = pts_next;
         sys->pts_next = pts_next;
diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c
index 7057bb95f66e27982a2bbf0072889cc04039f577..2773d6bfea2bf75aa6f5b94fd1b88b6f6a2e5134 100644
--- a/modules/demux/mjpeg.c
+++ b/modules/demux/mjpeg.c
@@ -309,7 +309,7 @@ static int Open( vlc_object_t * p_this )
     p_demux->pf_control = Control;
     p_demux->p_sys      = p_sys;
     p_sys->p_es         = NULL;
-    p_sys->i_time       = VLC_TS_0;
+    p_sys->i_time       = VLC_TICK_0;
     p_sys->i_level      = 0;
 
     p_sys->psz_separator = NULL;
diff --git a/modules/demux/mkv/demux.hpp b/modules/demux/mkv/demux.hpp
index 07b236914088e3976a233d17700a117b97f2dcef..dc67c613fdde99d6c309bbde731195b9532ac2e1 100644
--- a/modules/demux/mkv/demux.hpp
+++ b/modules/demux/mkv/demux.hpp
@@ -333,7 +333,7 @@ public:
         :demuxer(demux)
         ,i_pts(VLC_TICK_INVALID)
         ,i_pcr(VLC_TICK_INVALID)
-        ,i_start_pts(VLC_TS_0)
+        ,i_start_pts(VLC_TICK_0)
         ,i_mk_chapter_time(0)
         ,meta(NULL)
         ,i_current_title(0)
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 4768dccba3f5e2c91b3c5be4524095a6e5d34675..be85e30d770e7600b54377ed28d72b470d68c719 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -889,9 +889,9 @@ bool matroska_segment_c::Seek( demux_t &demuxer, vlc_tick_t i_absolute_mk_date,
     // propogate seek information //
 
     sys.i_pcr           = VLC_TICK_INVALID;
-    sys.i_pts           = VLC_TS_0 + i_mk_seek_time + i_mk_time_offset;
+    sys.i_pts           = VLC_TICK_0 + i_mk_seek_time + i_mk_time_offset;
     if (b_accurate)
-        sys.i_start_pts = VLC_TS_0 + i_absolute_mk_date;
+        sys.i_start_pts = VLC_TICK_0 + i_absolute_mk_date;
     else
         sys.i_start_pts = sys.i_pts;
 
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 667eb890aca37013b61412521c9da811982150e6..6d51a3594dfe868e895598d60d7f8c899accf69c 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -751,7 +751,7 @@ static int Demux( demux_t *p_demux)
             {
                 /* TODO handle successive chapters with the same user_start_time/user_end_time
                 */
-                p_sys->i_pts = p_chap->i_mk_virtual_stop_time + VLC_TS_0;
+                p_sys->i_pts = p_chap->i_mk_virtual_stop_time + VLC_TICK_0;
                 p_sys->i_pts++; // trick to avoid staying on segments with no duration and no content
 
                 return 1;
@@ -802,7 +802,7 @@ static int Demux( demux_t *p_demux)
 
     /* set pts */
     {
-        p_sys->i_pts = p_sys->i_mk_chapter_time + VLC_TS_0;
+        p_sys->i_pts = p_sys->i_mk_chapter_time + VLC_TICK_0;
 
         if( simpleblock != NULL ) p_sys->i_pts += simpleblock->GlobalTimecode() / INT64_C( 1000 );
         else                      p_sys->i_pts +=       block->GlobalTimecode() / INT64_C( 1000 );
diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp
index 2825c268ba46046dcc2f172a870e493cacfcf1d5..ca31d3340b6670845ee7ad67549db8d43bc0796c 100644
--- a/modules/demux/mkv/virtual_segment.cpp
+++ b/modules/demux/mkv/virtual_segment.cpp
@@ -439,16 +439,16 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux )
 
     if ( sys.i_pts != VLC_TICK_INVALID )
     {
-        if ( p_current_vchapter != NULL && p_current_vchapter->ContainsTimestamp( sys.i_pts - VLC_TS_0 ))
+        if ( p_current_vchapter != NULL && p_current_vchapter->ContainsTimestamp( sys.i_pts - VLC_TICK_0 ))
             p_cur_vchapter = p_current_vchapter;
         else if (p_cur_vedition != NULL)
-            p_cur_vchapter = p_cur_vedition->getChapterbyTimecode( sys.i_pts - VLC_TS_0 );
+            p_cur_vchapter = p_cur_vedition->getChapterbyTimecode( sys.i_pts - VLC_TICK_0 );
     }
 
     /* we have moved to a new chapter */
     if ( p_cur_vchapter != NULL && p_current_vchapter != p_cur_vchapter )
         {
-            msg_Dbg( &demux, "New Chapter %" PRId64 " uid=%" PRIu64, sys.i_pts - VLC_TS_0,
+            msg_Dbg( &demux, "New Chapter %" PRId64 " uid=%" PRIu64, sys.i_pts - VLC_TICK_0,
                      p_cur_vchapter->p_chapter ? p_cur_vchapter->p_chapter->i_uid : 0 );
             if ( p_cur_vedition->b_ordered )
             {
@@ -467,9 +467,9 @@ bool virtual_segment_c::UpdateCurrentToChapter( demux_t & demux )
                         Seek( demux, p_cur_vchapter->i_mk_virtual_start_time, p_cur_vchapter );
                         return true;
                     }
-                    sys.i_start_pts = p_cur_vchapter->i_mk_virtual_start_time + VLC_TS_0;
+                    sys.i_start_pts = p_cur_vchapter->i_mk_virtual_start_time + VLC_TICK_0;
                 }
-                sys.i_mk_chapter_time = p_cur_vchapter->i_mk_virtual_start_time - p_cur_vchapter->segment.i_mk_start_time - ( ( p_cur_vchapter->p_chapter )? p_cur_vchapter->p_chapter->i_start_time : 0 ) /* + VLC_TS_0 */;
+                sys.i_mk_chapter_time = p_cur_vchapter->i_mk_virtual_start_time - p_cur_vchapter->segment.i_mk_start_time - ( ( p_cur_vchapter->p_chapter )? p_cur_vchapter->p_chapter->i_start_time : 0 ) /* + VLC_TICK_0 */;
             }
 
             p_current_vchapter = p_cur_vchapter;
@@ -531,7 +531,7 @@ bool virtual_segment_c::Seek( demux_t & demuxer, vlc_tick_t i_mk_date,
     {
         vlc_tick_t i_mk_time_offset = p_vchapter->i_mk_virtual_start_time - ( ( p_vchapter->p_chapter )? p_vchapter->p_chapter->i_start_time : 0 );
         if (CurrentEdition()->b_ordered)
-            p_sys->i_mk_chapter_time = p_vchapter->i_mk_virtual_start_time - p_vchapter->segment.i_mk_start_time - ( ( p_vchapter->p_chapter )? p_vchapter->p_chapter->i_start_time : 0 ) /* + VLC_TS_0 */;
+            p_sys->i_mk_chapter_time = p_vchapter->i_mk_virtual_start_time - p_vchapter->segment.i_mk_start_time - ( ( p_vchapter->p_chapter )? p_vchapter->p_chapter->i_start_time : 0 ) /* + VLC_TICK_0 */;
         if ( p_vchapter->p_chapter && p_vchapter->i_seekpoint_num > 0 )
         {
             demuxer.info.i_update |= INPUT_UPDATE_TITLE | INPUT_UPDATE_SEEKPOINT;
diff --git a/modules/demux/mod.c b/modules/demux/mod.c
index 368a63ccd2f8fe30e064d21323eec591a2fd301f..370f7654f9b564348f9264fbdc301adabc17c331 100644
--- a/modules/demux/mod.c
+++ b/modules/demux/mod.c
@@ -279,7 +279,7 @@ static int Demux( demux_t *p_demux )
     }
     p_frame->i_buffer = i_read;
     p_frame->i_dts =
-    p_frame->i_pts = VLC_TS_0 + date_Get( &p_sys->pts );
+    p_frame->i_pts = VLC_TICK_0 + date_Get( &p_sys->pts );
 
     /* Set PCR */
     es_out_SetPCR( p_demux->out, p_frame->i_pts );
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index e1f64deaec2f31b5d4937ce4d5f735fff158936a..d4e42de47684a5b55c438a2e7191676a0ed36814 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -1319,12 +1319,12 @@ static int DemuxTrack( demux_t *p_demux, mp4_track_t *tk, uint64_t i_readpos,
             /* !important! Ensure clock is set before sending data */
             if( p_demux->p_sys->i_pcr == VLC_TICK_INVALID )
             {
-                es_out_SetPCR( p_demux->out, VLC_TS_0 + i_current_nzdts );
-                p_demux->p_sys->i_pcr = VLC_TS_0 + i_current_nzdts;
+                es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_current_nzdts );
+                p_demux->p_sys->i_pcr = VLC_TICK_0 + i_current_nzdts;
             }
 
             /* dts */
-            p_block->i_dts = VLC_TS_0 + i_current_nzdts;
+            p_block->i_dts = VLC_TICK_0 + i_current_nzdts;
             /* pts */
             if( MP4_TrackGetPTSDelta( p_demux, tk, &i_delta ) )
                 p_block->i_pts = p_block->i_dts + i_delta;
@@ -1468,7 +1468,7 @@ static int DemuxMoov( demux_t *p_demux )
     p_sys->i_nztime += DEMUX_INCREMENT;
     if( p_sys->i_pcr > VLC_TICK_INVALID )
     {
-        p_sys->i_pcr = VLC_TS_0 + p_sys->i_nztime;
+        p_sys->i_pcr = VLC_TICK_0 + p_sys->i_nztime;
         es_out_SetPCR( p_demux->out, p_sys->i_pcr );
     }
 
@@ -1821,7 +1821,7 @@ static int FragSeekToTime( demux_t *p_demux, vlc_tick_t i_nztime, bool b_accurat
     MP4ASF_ResetFrames( p_sys );
     /* And set next display time in that trun/fragment */
     if( b_accurate )
-        es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TS_0 + i_nztime );
+        es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME, VLC_TICK_0 + i_nztime );
     return VLC_SUCCESS;
 }
 
@@ -4421,17 +4421,17 @@ static int FragDemuxTrack( demux_t *p_demux, mp4_track_t *p_track,
 
 #if 0
         msg_Dbg( p_demux, "tk(%i)=%"PRId64" mv=%"PRId64" pos=%"PRIu64, p_track->i_track_ID,
-                 VLC_TS_0 + MP4_rescale( i_dts, p_track->i_timescale, CLOCK_FREQ ),
-                 VLC_TS_0 + MP4_rescale( i_pts, p_track->i_timescale, CLOCK_FREQ ),
+                 VLC_TICK_0 + MP4_rescale( i_dts, p_track->i_timescale, CLOCK_FREQ ),
+                 VLC_TICK_0 + MP4_rescale( i_pts, p_track->i_timescale, CLOCK_FREQ ),
                  p_track->context.i_trun_sample_pos - i_read );
 #endif
         if ( p_track->p_es )
         {
-            p_block->i_dts = VLC_TS_0 + MP4_rescale( i_dts, p_track->i_timescale, CLOCK_FREQ );
+            p_block->i_dts = VLC_TICK_0 + MP4_rescale( i_dts, p_track->i_timescale, CLOCK_FREQ );
             if( p_track->fmt.i_cat == VIDEO_ES && !( p_trun->i_flags & MP4_TRUN_SAMPLE_TIME_OFFSET ) )
                 p_block->i_pts = VLC_TICK_INVALID;
             else
-                p_block->i_pts = VLC_TS_0 + MP4_rescale( i_pts, p_track->i_timescale, CLOCK_FREQ );
+                p_block->i_pts = VLC_TICK_0 + MP4_rescale( i_pts, p_track->i_timescale, CLOCK_FREQ );
             p_block->i_length = MP4_rescale( dur, p_track->i_timescale, CLOCK_FREQ );
             MP4_Block_Send( p_demux, p_track, p_block );
         }
@@ -4462,7 +4462,7 @@ static int DemuxMoof( demux_t *p_demux )
 
     /* !important! Ensure clock is set before sending data */
     if( p_sys->i_pcr == VLC_TICK_INVALID )
-        es_out_SetPCR( p_demux->out, VLC_TS_0 + i_nztime );
+        es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_nztime );
 
     /* Set per track read state */
     for( unsigned i = 0; i < p_sys->i_tracks; i++ )
@@ -4536,7 +4536,7 @@ static int DemuxMoof( demux_t *p_demux )
     if( i_status != VLC_DEMUXER_EOS )
     {
         p_sys->i_nztime += DEMUX_INCREMENT;
-        p_sys->i_pcr = VLC_TS_0 + p_sys->i_nztime;
+        p_sys->i_pcr = VLC_TICK_0 + p_sys->i_nztime;
         es_out_SetPCR( p_demux->out, p_sys->i_pcr );
     }
     else
@@ -4555,7 +4555,7 @@ static int DemuxMoof( demux_t *p_demux )
         if( i_segment_end != INT64_MAX )
         {
             p_sys->i_nztime = i_segment_end;
-            p_sys->i_pcr = VLC_TS_0 + p_sys->i_nztime;
+            p_sys->i_pcr = VLC_TICK_0 + p_sys->i_nztime;
             es_out_SetPCR( p_demux->out, p_sys->i_pcr );
         }
     }
@@ -5071,7 +5071,7 @@ end:
                 i_demux_end = i_track_end;
         }
         if( i_demux_end != INT64_MIN )
-            es_out_SetPCR( p_demux->out, VLC_TS_0 + i_demux_end );
+            es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_demux_end );
     }
 
     return i_status;
diff --git a/modules/demux/mpc.c b/modules/demux/mpc.c
index f8648b7b85b5fa40bf343475d813ceb90a562848..75c149442286a6a9a3eea7750dbba9d914c17c41 100644
--- a/modules/demux/mpc.c
+++ b/modules/demux/mpc.c
@@ -293,7 +293,7 @@ static int Demux( demux_t *p_demux )
     /* */
     p_data->i_buffer = i_ret * sizeof(MPC_SAMPLE_FORMAT) * p_sys->info.channels;
     p_data->i_dts = p_data->i_pts =
-            VLC_TS_0 + CLOCK_FREQ * p_sys->i_position / p_sys->info.sample_freq;
+            VLC_TICK_0 + CLOCK_FREQ * p_sys->i_position / p_sys->info.sample_freq;
 
     es_out_SetPCR( p_demux->out, p_data->i_dts );
 
diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index 328cff70ac64248126e405663904d6086da20a1f..2702ec7bf4b2871a705a609bd29bbfa56200c058 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -331,13 +331,13 @@ static int Demux( demux_t *p_demux )
         {
             if( p_block_out->i_pts <= VLC_TICK_INVALID &&
                 p_block_out->i_dts <= VLC_TICK_INVALID )
-                p_block_out->i_dts = VLC_TS_0 + p_sys->i_pts + 1000000 / p_sys->f_fps;
+                p_block_out->i_dts = VLC_TICK_0 + p_sys->i_pts + 1000000 / p_sys->f_fps;
             if( p_block_out->i_dts > VLC_TICK_INVALID )
-                p_sys->i_pts = p_block_out->i_dts - VLC_TS_0;
+                p_sys->i_pts = p_block_out->i_dts - VLC_TICK_0;
         }
         else
         {
-            p_sys->i_pts = p_block_out->i_pts - VLC_TS_0;
+            p_sys->i_pts = p_block_out->i_pts - VLC_TICK_0;
         }
 
         if( p_block_out->i_pts > VLC_TICK_INVALID )
@@ -502,7 +502,7 @@ static bool Parse( demux_t *p_demux, block_t **pp_output )
             swab( p_block_in->p_buffer, p_block_in->p_buffer, p_block_in->i_buffer );
         }
 
-        p_block_in->i_pts = p_block_in->i_dts = p_sys->b_start || p_sys->b_initial_sync_failed ? VLC_TS_0 : VLC_TICK_INVALID;
+        p_block_in->i_pts = p_block_in->i_dts = p_sys->b_start || p_sys->b_initial_sync_failed ? VLC_TICK_0 : VLC_TICK_INVALID;
     }
     p_sys->b_initial_sync_failed = p_sys->b_start; /* Only try to resync once */
 
diff --git a/modules/demux/mpeg/h26x.c b/modules/demux/mpeg/h26x.c
index 24f2628d7e50112654b312594847d0ad79a3ce85..fbc96a9ba36406ddf0a9563d5283b9dd757e83e7 100644
--- a/modules/demux/mpeg/h26x.c
+++ b/modules/demux/mpeg/h26x.c
@@ -351,7 +351,7 @@ static int GenericOpen( demux_t *p_demux, const char *psz_module,
     }
     else
         date_Init( &p_sys->feed_dts, 25000, 1000 );
-    date_Set( &p_sys->feed_dts, VLC_TS_0 );
+    date_Set( &p_sys->feed_dts, VLC_TICK_0 );
     p_sys->output_dts = p_sys->feed_dts;
 
     /* Load the mpegvideo packetizer */
@@ -481,7 +481,7 @@ static int Demux( demux_t *p_demux)
             const vlc_tick_t i_frame_length = p_block_out->i_length;
 
             /* first output */
-            if( date_Get( &p_sys->output_dts ) == VLC_TS_0 )
+            if( date_Get( &p_sys->output_dts ) == VLC_TICK_0 )
                 es_out_SetPCR( p_demux->out, date_Get( &p_sys->output_dts ) );
 
             es_out_Send( p_demux->out, p_sys->p_es, p_block_out );
diff --git a/modules/demux/mpeg/mpeg4_iod.c b/modules/demux/mpeg/mpeg4_iod.c
index 8ead21f574362e2465bba8f3be44b3c8c8cd3d1f..f79e34cec88f564a58956104d4ce9c8909dcda3f 100644
--- a/modules/demux/mpeg/mpeg4_iod.c
+++ b/modules/demux/mpeg/mpeg4_iod.c
@@ -602,7 +602,7 @@ sl_header_data DecodeSLHeader( unsigned i_data, const uint8_t *p_data,
                     i_read |= bs_read( &s, i_bits );
                 }
                 if( sl->i_timestamp_resolution )
-                    *(timestamps[i].p_t) = VLC_TS_0 + CLOCK_FREQ * i_read / sl->i_timestamp_resolution;
+                    *(timestamps[i].p_t) = VLC_TICK_0 + CLOCK_FREQ * i_read / sl->i_timestamp_resolution;
             }
 
             bs_read( &s, sl->i_AU_length );
diff --git a/modules/demux/mpeg/mpgv.c b/modules/demux/mpeg/mpgv.c
index 08069b075d83391b3efcbe7ddd9b00e7900a700e..4bdeaf5184cb81557c5d505600e10e84132c54c1 100644
--- a/modules/demux/mpeg/mpgv.c
+++ b/modules/demux/mpeg/mpgv.c
@@ -158,7 +158,7 @@ static int Demux( demux_t *p_demux )
     if( p_block_in )
     {
         p_block_in->i_pts =
-        p_block_in->i_dts = ( p_sys->b_start ) ? VLC_TS_0 : VLC_TICK_INVALID;
+        p_block_in->i_dts = ( p_sys->b_start ) ? VLC_TICK_0 : VLC_TICK_INVALID;
     }
 
     while( (p_block_out = p_sys->p_packetizer->pf_packetize( p_sys->p_packetizer,
diff --git a/modules/demux/mpeg/ps.c b/modules/demux/mpeg/ps.c
index 1158ea5c96a01ec69056b14a8fdd65e698734853..05027d0da1a7ec193df07ed3d135db6d4c98942d 100644
--- a/modules/demux/mpeg/ps.c
+++ b/modules/demux/mpeg/ps.c
@@ -582,7 +582,7 @@ static int Demux( demux_t *p_demux )
                     p_sys->i_first_scr = -1;
                 }
                 else
-                    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pack_scr );
+                    es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_pack_scr );
             }
 
             if( tk->b_configured && tk->es &&
@@ -623,7 +623,7 @@ static int Demux( demux_t *p_demux )
                 {
                     /* Teletext may have missing PTS (ETSI EN 300 472 Annexe A)
                      * In this case use the last SCR + 40ms */
-                    p_pkt->i_pts = VLC_TS_0 + p_sys->i_scr + 40000;
+                    p_pkt->i_pts = VLC_TICK_0 + p_sys->i_scr + 40000;
                 }
 
                 if( (int64_t)p_pkt->i_pts > p_sys->i_current_pts )
diff --git a/modules/demux/mpeg/timestamps.h b/modules/demux/mpeg/timestamps.h
index 57f4fb08025a7e771555fd638c8b686df459fd98..22e87069ca855cf35818fe02d6e41f98fdc7d233 100644
--- a/modules/demux/mpeg/timestamps.h
+++ b/modules/demux/mpeg/timestamps.h
@@ -22,8 +22,8 @@
 #define FROM_SCALE_NZ(x) ((x) * 100 / 9)
 #define TO_SCALE_NZ(x)   ((x) * 9 / 100)
 
-#define FROM_SCALE(x) (VLC_TS_0 + FROM_SCALE_NZ(x))
-#define TO_SCALE(x)   TO_SCALE_NZ((x) - VLC_TS_0)
+#define FROM_SCALE(x) (VLC_TICK_0 + FROM_SCALE_NZ(x))
+#define TO_SCALE(x)   TO_SCALE_NZ((x) - VLC_TICK_0)
 
 static inline int64_t TimeStampWrapAround( int64_t i_first_pcr, int64_t i_time )
 {
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 3c9a484125932b932ab7e5b805725c4aa64f3d9f..5859462ae87f8513a7ef9a613738f1464086a991 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -1009,7 +1009,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
         {
             ReadyQueuesPostSeek( p_demux );
             es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
-                            FROM_SCALE(p_pmt->pcr.i_first) + i64 - VLC_TS_0 );
+                            FROM_SCALE(p_pmt->pcr.i_first) + i64 - VLC_TICK_0 );
             return VLC_SUCCESS;
         }
         break;
@@ -1984,7 +1984,7 @@ static int SeekToTime( demux_t *p_demux, const ts_pmt_t *p_pmt, int64_t i_scaled
                 int64_t i_diff = i_scaledtime - TimeStampWrapAround( p_pmt->pcr.i_first, i_pcr );
                 if ( i_diff < 0 )
                     i_tail_pos = (i_splitpos >= p_sys->i_packet_size) ? i_splitpos - p_sys->i_packet_size : 0;
-                else if( i_diff < TO_SCALE(VLC_TS_0 + CLOCK_FREQ / 2) ) // 500ms
+                else if( i_diff < TO_SCALE(VLC_TICK_0 + CLOCK_FREQ / 2) ) // 500ms
                     b_found = true;
                 else
                     i_head_pos = i_pos;
@@ -2087,7 +2087,7 @@ static int ProbeChunk( demux_t *p_demux, int i_program, bool b_end, int64_t *pi_
                         {
                             p_pmt->pcr.i_first = *pi_pcr;
                         }
-                        else if( p_pmt->pcr.i_first_dts < VLC_TS_0 )
+                        else if( p_pmt->pcr.i_first_dts < VLC_TICK_0 )
                         {
                             p_pmt->pcr.i_first_dts = FROM_SCALE(*pi_pcr);
                         }
diff --git a/modules/demux/mpeg/ts_scte.c b/modules/demux/mpeg/ts_scte.c
index 029c3c65a2d1f4c3f12f3f2cac4e338f10a63fc3..2629b7e5a89dad5f83e99125cc4c49a26aa7d840 100644
--- a/modules/demux/mpeg/ts_scte.c
+++ b/modules/demux/mpeg/ts_scte.c
@@ -111,7 +111,7 @@ void SCTE27_Section_Callback( demux_t *p_demux,
 
     }
 
-    p_content->i_dts = p_content->i_pts = VLC_TS_0 + i_date * 100 / 9;
+    p_content->i_dts = p_content->i_pts = VLC_TICK_0 + i_date * 100 / 9;
     //PCRFixHandle( p_demux, p_pmt, p_content );
 
     if( p_pes->p_es->id )
diff --git a/modules/demux/nsv.c b/modules/demux/nsv.c
index 5fb0bc93c07aeb2cf51032ae9175c07dd1e81a74..8ab318a39d29b3ca338068cb918ae360bb3430e5 100644
--- a/modules/demux/nsv.c
+++ b/modules/demux/nsv.c
@@ -207,7 +207,7 @@ static int Demux( demux_t *p_demux )
     }
 
     /* Set PCR */
-    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr );
+    es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_pcr );
 
     /* Read video */
     i_size = ( header[0] >> 4 ) | ( header[1] << 4 ) | ( header[2] << 12 );
@@ -256,8 +256,8 @@ static int Demux( demux_t *p_demux )
                     }
 
                     /* Skip the first part (it is the language name) */
-                    p_frame->i_pts = VLC_TS_0 + p_sys->i_pcr;
-                    p_frame->i_dts = VLC_TS_0 + p_sys->i_pcr + 4000000;    /* 4s */
+                    p_frame->i_pts = VLC_TICK_0 + p_sys->i_pcr;
+                    p_frame->i_dts = VLC_TICK_0 + p_sys->i_pcr + 4000000;    /* 4s */
 
                     es_out_Send( p_demux->out, p_sys->p_sub, p_frame );
                 }
@@ -277,7 +277,7 @@ static int Demux( demux_t *p_demux )
         /* msg_Dbg( p_demux, "frame video size=%d", i_size ); */
         if( i_size > 0 && ( p_frame = vlc_stream_Block( p_demux->s, i_size ) ) )
         {
-            p_frame->i_dts = VLC_TS_0 + p_sys->i_pcr;
+            p_frame->i_dts = VLC_TICK_0 + p_sys->i_pcr;
 
             if( p_sys->p_video )
                 es_out_Send( p_demux->out, p_sys->p_video, p_frame );
@@ -314,7 +314,7 @@ static int Demux( demux_t *p_demux )
         if( ( p_frame = vlc_stream_Block( p_demux->s, i_size ) ) )
         {
             p_frame->i_dts =
-            p_frame->i_pts = VLC_TS_0 + p_sys->i_pcr;
+            p_frame->i_pts = VLC_TICK_0 + p_sys->i_pcr;
 
             if( p_sys->p_audio )
                 es_out_Send( p_demux->out, p_sys->p_audio, p_frame );
diff --git a/modules/demux/nuv.c b/modules/demux/nuv.c
index 718de83528e84a850eae9608f68e87efa4c48967..7a97071557dd288b52d839f8d9e70cd462fab10c 100644
--- a/modules/demux/nuv.c
+++ b/modules/demux/nuv.c
@@ -388,20 +388,20 @@ static int Demux( demux_t *p_demux )
     if( ( p_data = vlc_stream_Block( p_demux->s, fh.i_length ) ) == NULL )
         return VLC_DEMUXER_EOF;
 
-    p_data->i_dts = VLC_TS_0 + (int64_t)fh.i_timecode * 1000;
+    p_data->i_dts = VLC_TICK_0 + (int64_t)fh.i_timecode * 1000;
     p_data->i_pts = (fh.i_type == 'V') ? VLC_TICK_INVALID : p_data->i_dts;
 
     /* only add keyframes to index */
     if( !fh.i_keyframe && !p_sys->b_index )
         demux_IndexAppend( &p_sys->idx,
-                           p_data->i_dts - VLC_TS_0,
+                           p_data->i_dts - VLC_TICK_0,
                            vlc_stream_Tell(p_demux->s) - NUV_FH_SIZE );
 
     /* */
-    if( p_sys->i_pcr < 0 || p_sys->i_pcr < p_data->i_dts - VLC_TS_0 )
+    if( p_sys->i_pcr < 0 || p_sys->i_pcr < p_data->i_dts - VLC_TICK_0 )
     {
-        p_sys->i_pcr = p_data->i_dts - VLC_TS_0;
-        es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr );
+        p_sys->i_pcr = p_data->i_dts - VLC_TICK_0;
+        es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_pcr );
     }
 
     if( fh.i_type == 'A' && p_sys->p_es_audio )
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 57a400f8ba27cadfb1733aa50dd1f9fb70176155..009950dda1291ed53612141e04e1a0c3c35462b6 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -322,7 +322,7 @@ static int Demux( demux_t * p_demux )
 
             if( i_lastpcr > VLC_TICK_INVALID )
             {
-                p_sys->i_nzpcr_offset = i_lastpcr - VLC_TS_0;
+                p_sys->i_nzpcr_offset = i_lastpcr - VLC_TICK_0;
                 if( likely( !p_sys->b_slave ) )
                     es_out_SetPCR( p_demux->out, i_lastpcr );
             }
@@ -420,7 +420,7 @@ static int Demux( demux_t * p_demux )
                 msg_Err( p_demux, "Broken Ogg stream (serialno) mismatch" );
                 Ogg_ResetStream( p_stream );
                 if( p_stream->i_pcr > VLC_TICK_INVALID )
-                    p_sys->i_nzpcr_offset = p_stream->i_pcr - VLC_TS_0;
+                    p_sys->i_nzpcr_offset = p_stream->i_pcr - VLC_TICK_0;
                 ogg_stream_reset_serialno( &p_stream->os, ogg_page_serialno( &p_sys->current_page ) );
             }
 
@@ -448,7 +448,7 @@ static int Demux( demux_t * p_demux )
         const int i_page_packets = ogg_page_packets( &p_sys->current_page );
         bool b_doprepcr = false;
 
-        if ( p_stream->i_pcr < VLC_TS_0 && ogg_page_granulepos( &p_sys->current_page ) > 0 )
+        if ( p_stream->i_pcr < VLC_TICK_0 && ogg_page_granulepos( &p_sys->current_page ) > 0 )
         {
             // PASS 0
             if ( p_stream->fmt.i_codec == VLC_CODEC_OPUS ||
@@ -595,7 +595,7 @@ static int Demux( demux_t * p_demux )
                             p_block->i_flags |= BLOCK_FLAG_PREROLL;
                     }
                     else
-                        p_block->i_pts = VLC_TS_0 + p_sys->i_nzpcr_offset + pagestamp;
+                        p_block->i_pts = VLC_TICK_0 + p_sys->i_nzpcr_offset + pagestamp;
                     b_fixed = true;
                     break;
                 default:
@@ -604,7 +604,7 @@ static int Demux( demux_t * p_demux )
                         pagestamp = pagestamp - ( CLOCK_FREQ / p_stream->f_rate );
                         if( pagestamp < 0 )
                             pagestamp = 0;
-                        p_block->i_pts = VLC_TS_0 + p_sys->i_nzpcr_offset + pagestamp;
+                        p_block->i_pts = VLC_TICK_0 + p_sys->i_nzpcr_offset + pagestamp;
                         b_fixed = true;
                     }
                 }
@@ -614,7 +614,7 @@ static int Demux( demux_t * p_demux )
             {
                 pagestamp = p_stream->i_previous_pcr; /* as set above */
                 if ( pagestamp < 0 ) pagestamp = 0;
-                p_stream->i_pcr = VLC_TS_0 + pagestamp;
+                p_stream->i_pcr = VLC_TICK_0 + pagestamp;
                 p_stream->i_pcr += p_sys->i_nzpcr_offset;
                 p_stream->i_previous_granulepos = ogg_page_granulepos( &p_sys->current_page );
             }
@@ -630,7 +630,7 @@ static int Demux( demux_t * p_demux )
                             ogg_page_granulepos( &p_sys->current_page ), false );
         if ( i_pagestamp > -1 )
         {
-            p_stream->i_pcr = VLC_TS_0 + i_pagestamp;
+            p_stream->i_pcr = VLC_TICK_0 + i_pagestamp;
             p_stream->i_pcr += p_sys->i_nzpcr_offset;
         }
 
@@ -664,13 +664,13 @@ static int Demux( demux_t * p_demux )
             continue;
         if( p_stream->fmt.i_codec == VLC_CODEC_OGGSPOTS )
             continue;
-        if( p_stream->i_pcr < VLC_TS_0 )
+        if( p_stream->i_pcr < VLC_TICK_0 )
             continue;
         if ( p_stream->b_finished || p_stream->b_initializing )
             continue;
         if ( p_stream->p_preparse_block )
             continue;
-        if( i_pcr_candidate < VLC_TS_0
+        if( i_pcr_candidate < VLC_TICK_0
             || p_stream->i_pcr <= i_pcr_candidate )
         {
             i_pcr_candidate = p_stream->i_pcr;
@@ -815,7 +815,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
                 Ogg_ResetStreamsHelper( p_sys );
                 if( acc )
                     es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
-                                    VLC_TS_0 + i64 );
+                                    VLC_TICK_0 + i64 );
                 return VLC_SUCCESS;
             }
             else
@@ -883,11 +883,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             assert( p_sys->i_length > 0 );
             i64 = p_sys->i_length * f;
             Ogg_ResetStreamsHelper( p_sys );
-            if ( Oggseek_SeektoAbsolutetime( p_demux, p_stream, VLC_TS_0 + i64 ) >= 0 )
+            if ( Oggseek_SeektoAbsolutetime( p_demux, p_stream, VLC_TICK_0 + i64 ) >= 0 )
             {
                 if( acc )
                     es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
-                                    VLC_TS_0 + i64 );
+                                    VLC_TICK_0 + i64 );
                 return VLC_SUCCESS;
             }
 
@@ -957,7 +957,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             {
                 Ogg_ResetStreamsHelper( p_sys );
                 es_out_Control( p_demux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
-                                VLC_TS_0 + i64 );
+                                VLC_TICK_0 + i64 );
                 p_demux->info.i_update |= INPUT_UPDATE_SEEKPOINT;
                 p_demux->info.i_seekpoint = i_seekpoint;
                 return VLC_SUCCESS;
@@ -1018,7 +1018,7 @@ static void Ogg_UpdatePCR( demux_t *p_demux, logical_stream_t *p_stream,
         if( p_stream->b_oggds && p_oggpacket->bytes > 0 &&
             (p_oggpacket->packet[0] & PACKET_TYPE_HEADER) == 0 )
         {
-            p_stream->i_pcr = VLC_TS_0 + p_ogg->i_nzpcr_offset;
+            p_stream->i_pcr = VLC_TICK_0 + p_ogg->i_nzpcr_offset;
         }
     }
     else if( p_oggpacket->granulepos > 0 )
@@ -1032,7 +1032,7 @@ static void Ogg_UpdatePCR( demux_t *p_demux, logical_stream_t *p_stream,
             p_stream->fmt.i_codec == VLC_CODEC_OGGSPOTS ||
             (p_stream->b_oggds && p_stream->fmt.i_cat == VIDEO_ES) )
         {
-            p_stream->i_pcr = VLC_TS_0 + Oggseek_GranuleToAbsTimestamp( p_stream,
+            p_stream->i_pcr = VLC_TICK_0 + Oggseek_GranuleToAbsTimestamp( p_stream,
                                          p_oggpacket->granulepos, true );
             p_stream->i_pcr += p_ogg->i_nzpcr_offset;
         }
@@ -1059,7 +1059,7 @@ static void Ogg_UpdatePCR( demux_t *p_demux, logical_stream_t *p_stream,
             else
                 sample = 0;
 
-            p_stream->i_pcr =  VLC_TS_0 + sample * CLOCK_FREQ / p_stream->f_rate;
+            p_stream->i_pcr =  VLC_TICK_0 + sample * CLOCK_FREQ / p_stream->f_rate;
             p_stream->i_pcr += p_ogg->i_nzpcr_offset;
         }
 
@@ -1073,13 +1073,13 @@ static void Ogg_UpdatePCR( demux_t *p_demux, logical_stream_t *p_stream,
         {
             if( p_stream->i_previous_granulepos > 0 )
             {
-                p_stream->i_pcr = VLC_TS_0 + Oggseek_GranuleToAbsTimestamp( p_stream, ++p_stream->i_previous_granulepos, false );
+                p_stream->i_pcr = VLC_TICK_0 + Oggseek_GranuleToAbsTimestamp( p_stream, ++p_stream->i_previous_granulepos, false );
                 p_stream->i_pcr += p_ogg->i_nzpcr_offset;
             }
             /* First frame in ogm can be -1 (0 0 -1 2 3 -1 5 ...) */
             else if( p_stream->i_previous_granulepos == 0 )
             {
-                p_stream->i_pcr = VLC_TS_0 + p_ogg->i_nzpcr_offset;
+                p_stream->i_pcr = VLC_TICK_0 + p_ogg->i_nzpcr_offset;
             }
             else
             {
@@ -1112,7 +1112,7 @@ static void Ogg_UpdatePCR( demux_t *p_demux, logical_stream_t *p_stream,
             i_duration = p_stream->special.speex.i_framesize *
                          p_stream->special.speex.i_framesperpacket;
             p_oggpacket->granulepos = p_stream->i_previous_granulepos + i_duration;
-            p_stream->i_pcr = VLC_TS_0 + Oggseek_GranuleToAbsTimestamp( p_stream,
+            p_stream->i_pcr = VLC_TICK_0 + Oggseek_GranuleToAbsTimestamp( p_stream,
                                     p_stream->i_previous_granulepos, false );
             p_stream->i_pcr += p_ogg->i_nzpcr_offset;
         }
@@ -1129,7 +1129,7 @@ static void Ogg_UpdatePCR( demux_t *p_demux, logical_stream_t *p_stream,
             else
                 sample = 0;
 
-            p_stream->i_pcr = VLC_TS_0 + sample * CLOCK_FREQ / p_stream->f_rate;
+            p_stream->i_pcr = VLC_TICK_0 + sample * CLOCK_FREQ / p_stream->f_rate;
             p_stream->i_pcr += p_ogg->i_nzpcr_offset;
         }
         else if( p_stream->fmt.i_cat == VIDEO_ES && p_stream->i_pcr > VLC_TS_UNKNOWN )
@@ -1173,25 +1173,25 @@ static void Ogg_SendOrQueueBlocks( demux_t *p_demux, logical_stream_t *p_stream,
             block_t *temp = p_stream->p_preparse_block;
             while ( temp )
             {
-                if ( temp && i_firstpts < VLC_TS_0 )
+                if ( temp && i_firstpts < VLC_TICK_0 )
                     i_firstpts = temp->i_pts;
 
                 block_t *tosend = temp;
                 temp = temp->p_next;
                 tosend->p_next = NULL;
 
-                if( tosend->i_dts < VLC_TS_0 )
+                if( tosend->i_dts < VLC_TICK_0 )
                 {
                     tosend->i_dts = tosend->i_pts;
                 }
 
-                if( tosend->i_dts < VLC_TS_0 )
+                if( tosend->i_dts < VLC_TICK_0 )
                 {
                     /* Don't send metadata from chained streams */
                     block_Release( tosend );
                     continue;
                 }
-                else if( tosend->i_dts < VLC_TS_0 )
+                else if( tosend->i_dts < VLC_TICK_0 )
                 {
                     tosend->i_dts = tosend->i_pts;
                 }
@@ -1200,7 +1200,7 @@ static void Ogg_SendOrQueueBlocks( demux_t *p_demux, logical_stream_t *p_stream,
                          tosend->i_dts, tosend->i_pts, p_stream->i_pcr, p_ogg->i_pcr ); )
                 es_out_Send( p_demux->out, p_stream->p_es, tosend );
 
-                if ( p_ogg->i_pcr < VLC_TS_0 && i_firstpts > VLC_TICK_INVALID )
+                if ( p_ogg->i_pcr < VLC_TICK_0 && i_firstpts > VLC_TICK_INVALID )
                 {
                     p_ogg->i_pcr = i_firstpts;
                     if( likely( !p_ogg->b_slave ) )
@@ -1450,8 +1450,8 @@ static void Ogg_DecodePacket( demux_t *p_demux,
         {
             ogg_int64_t nzdts = Oggseek_GranuleToAbsTimestamp( p_stream, p_oggpacket->granulepos, false );
             ogg_int64_t nzpts = Oggseek_GranuleToAbsTimestamp( p_stream, p_oggpacket->granulepos, true );
-            p_block->i_dts = ( nzdts > VLC_TICK_INVALID ) ? VLC_TS_0 + nzdts : nzdts;
-            p_block->i_pts = ( nzpts > VLC_TICK_INVALID ) ? VLC_TS_0 + nzpts : nzpts;
+            p_block->i_dts = ( nzdts > VLC_TICK_INVALID ) ? VLC_TICK_0 + nzdts : nzdts;
+            p_block->i_pts = ( nzpts > VLC_TICK_INVALID ) ? VLC_TICK_0 + nzpts : nzpts;
             /* granulepos for dirac is possibly broken, this value should be ignored */
             if( 0 >= p_oggpacket->granulepos )
             {
diff --git a/modules/demux/pva.c b/modules/demux/pva.c
index 4f684845d5852d219c18841f689e8b00955beeb5..5b517c44b4d0f14d2ee5c0e2c722ab9479ae8d88 100644
--- a/modules/demux/pva.c
+++ b/modules/demux/pva.c
@@ -234,7 +234,7 @@ static int Demux( demux_t *p_demux )
                 p_frame->p_buffer += i_skip;
                 p_frame->i_buffer -= i_skip;
                 if( i_pts >= 0 )
-                    p_frame->i_pts = VLC_TS_0 + i_pts * 100 / 9;
+                    p_frame->i_pts = VLC_TICK_0 + i_pts * 100 / 9;
                 block_ChainAppend( &p_sys->p_es, p_frame );
             }
             break;
@@ -445,9 +445,9 @@ static void ParsePES( demux_t *p_demux )
     p_pes->p_buffer += i_skip;
 
     if( i_dts >= 0 )
-        p_pes->i_dts = VLC_TS_0 + i_dts * 100 / 9;
+        p_pes->i_dts = VLC_TICK_0 + i_dts * 100 / 9;
     if( i_pts >= 0 )
-        p_pes->i_pts = VLC_TS_0 + i_pts * 100 / 9;
+        p_pes->i_pts = VLC_TICK_0 + i_pts * 100 / 9;
 
     /* Set PCR */
     if( p_pes->i_pts > 0 )
diff --git a/modules/demux/rawaud.c b/modules/demux/rawaud.c
index 375bdb12444cbf50677c665692e81986182029e2..48ef94615bcc3d38c4f73427e0be5e7b5d22b68c 100644
--- a/modules/demux/rawaud.c
+++ b/modules/demux/rawaud.c
@@ -251,7 +251,7 @@ static int Demux( demux_t *p_demux )
         return 0;
     }
 
-    p_block->i_dts = p_block->i_pts = VLC_TS_0 + date_Get( &p_sys->pts );
+    p_block->i_dts = p_block->i_pts = VLC_TICK_0 + date_Get( &p_sys->pts );
 
     es_out_SetPCR( p_demux->out, p_block->i_pts );
     es_out_Send( p_demux->out, p_sys->p_es, p_block );
diff --git a/modules/demux/rawdv.c b/modules/demux/rawdv.c
index 9c5099ad49cef3031936902f247941d7b890cbae..4cf2e5d0bb3523bb83a8f0da6867ff8c19e2519c 100644
--- a/modules/demux/rawdv.c
+++ b/modules/demux/rawdv.c
@@ -263,7 +263,7 @@ static int Demux( demux_t *p_demux )
     }
 
     /* Call the pace control */
-    es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_pcr );
+    es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_pcr );
     p_block = vlc_stream_Block( p_demux->s, p_sys->frame_size );
     if( p_block == NULL )
     {
@@ -278,7 +278,7 @@ static int Demux( demux_t *p_demux )
     }
 
     p_block->i_dts =
-    p_block->i_pts = VLC_TS_0 + p_sys->i_pcr;
+    p_block->i_pts = VLC_TICK_0 + p_sys->i_pcr;
 
     if( b_audio )
     {
diff --git a/modules/demux/rawvid.c b/modules/demux/rawvid.c
index c5deacc0179627b18247baa20a2e38f23ed7727b..a2ab745f70a9ba5c07bff66979cb119288ec4a4b 100644
--- a/modules/demux/rawvid.c
+++ b/modules/demux/rawvid.c
@@ -395,7 +395,7 @@ static int Demux( demux_t *p_demux )
     vlc_tick_t i_pcr = date_Get( &p_sys->pcr );
 
     /* Call the pace control */
-    es_out_SetPCR( p_demux->out, VLC_TS_0 + i_pcr );
+    es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_pcr );
 
     if( p_sys->b_y4m )
     {
@@ -421,7 +421,7 @@ static int Demux( demux_t *p_demux )
         return 0;
     }
 
-    p_block->i_dts = p_block->i_pts = VLC_TS_0 + i_pcr;
+    p_block->i_dts = p_block->i_pts = VLC_TICK_0 + i_pcr;
     es_out_Send( p_demux->out, p_sys->p_es_video, p_block );
 
     date_Increment( &p_sys->pcr, 1 );
diff --git a/modules/demux/real.c b/modules/demux/real.c
index 3d22b40f4b7e1541a7d990b1fc789c6d1d496293..c3c2528c664ad74198a7dc6f33640fa39ab62c9c 100644
--- a/modules/demux/real.c
+++ b/modules/demux/real.c
@@ -305,7 +305,7 @@ static int Demux( demux_t *p_demux )
     //const int i_version = GetWBE( &header[0] );
     const size_t  i_size = GetWBE( &header[2] ) - 12;
     const int     i_id   = GetWBE( &header[4] );
-    const int64_t i_pts  = VLC_TS_0 + 1000 * GetDWBE( &header[6] );
+    const int64_t i_pts  = VLC_TICK_0 + 1000 * GetDWBE( &header[6] );
     const int     i_flags= header[11]; /* flags 0x02 -> keyframe */
 
     p_sys->i_data_packets++;
@@ -442,9 +442,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             {
                 /* it is a rtsp stream , it is specials in access/rtsp/... */
                 msg_Dbg(p_demux, "Seek in real rtsp stream!");
-                p_sys->i_pcr = VLC_TS_0 + INT64_C(1000) * ( p_sys->i_our_duration * f  );
+                p_sys->i_pcr = VLC_TICK_0 + INT64_C(1000) * ( p_sys->i_our_duration * f  );
                 p_sys->b_seek = true;
-                return vlc_stream_Seek( p_demux->s, p_sys->i_pcr - VLC_TS_0 );
+                return vlc_stream_Seek( p_demux->s, p_sys->i_pcr - VLC_TICK_0 );
             }
             return ControlSeekByte( p_demux, i64 );
 
diff --git a/modules/demux/sid.cpp b/modules/demux/sid.cpp
index 12a874f6a3b2f7597759176d4046bce41a45dabd..e71818bcd704badf840a438973cadfa5115b943e 100644
--- a/modules/demux/sid.cpp
+++ b/modules/demux/sid.cpp
@@ -218,7 +218,7 @@ static int Demux (demux_t *demux)
         return 0;
     }
     block->i_buffer = i_read;
-    block->i_pts = block->i_dts = VLC_TS_0 + date_Get (&sys->pts);
+    block->i_pts = block->i_dts = VLC_TICK_0 + date_Get (&sys->pts);
 
     es_out_SetPCR (demux->out, block->i_pts);
 
diff --git a/modules/demux/smf.c b/modules/demux/smf.c
index 4821e6e21cfcd594a38b19734d1850ab87bb056f..c264b0f4d1a1c180022e35b28ebbc82f6b3db3ce 100644
--- a/modules/demux/smf.c
+++ b/modules/demux/smf.c
@@ -372,9 +372,9 @@ static int SeekSet0 (demux_t *demux)
 
     /* Default SMF tempo is 120BPM, i.e. half a second per quarter note */
     date_Init (&sys->pts, sys->ppqn * 2, 1);
-    date_Set (&sys->pts, VLC_TS_0);
+    date_Set (&sys->pts, VLC_TICK_0);
     sys->pulse = 0;
-    sys->tick = VLC_TS_0;
+    sys->tick = VLC_TICK_0;
 
     for (unsigned i = 0; i < sys->trackc; i++)
     {
@@ -489,7 +489,7 @@ static int Seek (demux_t *demux, vlc_tick_t pts)
     }
 
     sys->pulse = pulse;
-    sys->tick = ((date_Get (&sys->pts) - VLC_TS_0) / TICK) * TICK + VLC_TS_0;
+    sys->tick = ((date_Get (&sys->pts) - VLC_TICK_0) / TICK) * TICK + VLC_TICK_0;
     return VLC_SUCCESS;
 }
 
@@ -508,7 +508,7 @@ static int Control (demux_t *demux, int i_query, va_list args)
         case DEMUX_GET_POSITION:
             if (!sys->duration)
                 return VLC_EGENERIC;
-            *va_arg (args, double *) = (sys->tick - (double)VLC_TS_0)
+            *va_arg (args, double *) = (sys->tick - (double)VLC_TICK_0)
                                      / sys->duration;
             break;
         case DEMUX_SET_POSITION:
@@ -517,7 +517,7 @@ static int Control (demux_t *demux, int i_query, va_list args)
             *va_arg (args, int64_t *) = sys->duration;
             break;
         case DEMUX_GET_TIME:
-            *va_arg (args, int64_t *) = sys->tick - VLC_TS_0;
+            *va_arg (args, int64_t *) = sys->tick - VLC_TICK_0;
             break;
         case DEMUX_SET_TIME:
             return Seek (demux, va_arg (args, int64_t));
diff --git a/modules/demux/stl.c b/modules/demux/stl.c
index 9a6c90c3777582d93156914bc2a7fed23dd4e402..f0664c2bf8bb1971189362ea25caa3aceef27b6f 100644
--- a/modules/demux/stl.c
+++ b/modules/demux/stl.c
@@ -183,7 +183,7 @@ static int Demux(demux_t *demux)
 
         if (!sys->b_slave && sys->b_first_time)
         {
-            es_out_SetPCR(demux->out, VLC_TS_0 + i_barrier);
+            es_out_SetPCR(demux->out, VLC_TICK_0 + i_barrier);
             sys->b_first_time = false;
         }
 
@@ -197,7 +197,7 @@ static int Demux(demux_t *demux)
         if (b && b->i_buffer == 128)
         {
             b->i_dts =
-            b->i_pts = VLC_TS_0 + s->start;
+            b->i_pts = VLC_TICK_0 + s->start;
             if (s->stop > s->start)
                 b->i_length = s->stop - s->start;
             es_out_Send(demux->out, sys->es, b);
@@ -213,7 +213,7 @@ static int Demux(demux_t *demux)
 
     if (!sys->b_slave)
     {
-        es_out_SetPCR(demux->out, VLC_TS_0 + i_barrier);
+        es_out_SetPCR(demux->out, VLC_TICK_0 + i_barrier);
         sys->next_date += CLOCK_FREQ / 8;
     }
 
diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index d2c7a40b3f00530828c2fde7833d12fb0a9d1a64..7a7a99c230b71cca449c35c6b689b59e897564b3 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -816,14 +816,14 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             f = va_arg( args, double );
             if( p_sys->subtitles.i_count && p_sys->i_length )
             {
-                i64 = VLC_TS_0 + f * p_sys->i_length;
+                i64 = VLC_TICK_0 + f * p_sys->i_length;
                 return demux_Control( p_demux, DEMUX_SET_TIME, i64 );
             }
             break;
 
         case DEMUX_SET_NEXT_DEMUX_TIME:
             p_sys->b_slave = true;
-            p_sys->i_next_demux_date = va_arg( args, int64_t ) - VLC_TS_0;
+            p_sys->i_next_demux_date = va_arg( args, int64_t ) - VLC_TICK_0;
             return VLC_SUCCESS;
 
         case DEMUX_GET_PTS_DELAY:
@@ -858,7 +858,7 @@ static int Demux( demux_t *p_demux )
 
         if ( !p_sys->b_slave && p_sys->b_first_time )
         {
-            es_out_SetPCR( p_demux->out, VLC_TS_0 + i_barrier );
+            es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_barrier );
             p_sys->b_first_time = false;
         }
 
@@ -868,7 +868,7 @@ static int Demux( demux_t *p_demux )
             if( p_block )
             {
                 p_block->i_dts =
-                p_block->i_pts = VLC_TS_0 + p_subtitle->i_start;
+                p_block->i_pts = VLC_TICK_0 + p_subtitle->i_start;
                 if( p_subtitle->i_stop >= 0 && p_subtitle->i_stop >= p_subtitle->i_start )
                     p_block->i_length = p_subtitle->i_stop - p_subtitle->i_start;
 
@@ -881,7 +881,7 @@ static int Demux( demux_t *p_demux )
 
     if ( !p_sys->b_slave )
     {
-        es_out_SetPCR( p_demux->out, VLC_TS_0 + i_barrier );
+        es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_barrier );
         p_sys->i_next_demux_date += CLOCK_FREQ / 8;
     }
 
@@ -2433,7 +2433,7 @@ static int ParseSCC( vlc_object_t *p_obj, subs_properties_t *p_props,
             /* convert to frame # at 29.97 */
             i_frames = i_frames * framerates[3].rate.num / framerates[3].rate.den + f;
         }
-        p_subtitle->i_start = VLC_TS_0 + i_frames * CLOCK_FREQ *
+        p_subtitle->i_start = VLC_TICK_0 + i_frames * CLOCK_FREQ *
                                          p_rate->rate.den / p_rate->rate.num;
         p_subtitle->i_stop = -1;
 
diff --git a/modules/demux/tta.c b/modules/demux/tta.c
index 2da7460cc9e6e330c72743baa9ab934e4aea84ff..a25f7e459df7a95a129e8a563b8d466ddcdcd337 100644
--- a/modules/demux/tta.c
+++ b/modules/demux/tta.c
@@ -207,7 +207,7 @@ static int Demux( demux_t *p_demux )
     p_data = vlc_stream_Block( p_demux->s,
                                p_sys->pi_seektable[p_sys->i_currentframe] );
     if( p_data == NULL ) return 0;
-    p_data->i_dts = p_data->i_pts = VLC_TS_0 + (int64_t)(INT64_C(1000000) * p_sys->i_currentframe) * TTA_FRAMETIME;
+    p_data->i_dts = p_data->i_pts = VLC_TICK_0 + (int64_t)(INT64_C(1000000) * p_sys->i_currentframe) * TTA_FRAMETIME;
 
     p_sys->i_currentframe++;
 
diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index 4eeabddd4a4e89e21bd562501ca88b1fa7797bfb..bb80e6530052b1c4a1c5bf1b4d89dae0fafa8c74 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -238,7 +238,7 @@ static int Control( demux_t* p_demux, int i_query, va_list args )
             i64 = va_arg( args, int64_t );
             if( p_sys->times.i_count )
             {
-                tt_time_t t = tt_time_Create( i64 - VLC_TS_0 );
+                tt_time_t t = tt_time_Create( i64 - VLC_TICK_0 );
                 size_t i_index = tt_timings_FindLowerIndex( p_sys->times.p_array,
                                                             p_sys->times.i_count, t, &b );
                 p_sys->times.i_current = i_index;
@@ -365,7 +365,7 @@ static int Demux( demux_t* p_demux )
 
         if ( !p_sys->b_slave && p_sys->b_first_time )
         {
-            es_out_SetPCR( p_demux->out, VLC_TS_0 + i_playbacktime );
+            es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_playbacktime );
             p_sys->b_first_time = false;
         }
 
@@ -383,7 +383,7 @@ static int Demux( demux_t* p_demux )
             if( p_block )
             {
                 p_block->i_dts =
-                    p_block->i_pts = VLC_TS_0 + i_playbacktime;
+                    p_block->i_pts = VLC_TICK_0 + i_playbacktime;
                 p_block->i_length = i_playbackendtime - i_playbacktime;
 
                 es_out_Send( p_demux->out, p_sys->p_es, p_block );
@@ -395,7 +395,7 @@ static int Demux( demux_t* p_demux )
 
     if ( !p_sys->b_slave )
     {
-        es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_next_demux_time );
+        es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_next_demux_time );
         p_sys->i_next_demux_time += CLOCK_FREQ / 8;
     }
 
diff --git a/modules/demux/ty.c b/modules/demux/ty.c
index 2a01ff0a48cf8e9fe060999215edf58610c30055..8237ce84ec63feec544fec8202ccbf3303a54856 100644
--- a/modules/demux/ty.c
+++ b/modules/demux/ty.c
@@ -628,7 +628,7 @@ static int check_sync_pes( demux_t *p_demux, block_t *p_block,
         return -1;    /* partial PES, no audio data */
     }
     /* full PES header present, extract PTS */
-    p_sys->lastAudioPTS = VLC_TS_0 + get_pts( &p_block->p_buffer[ offset +
+    p_sys->lastAudioPTS = VLC_TICK_0 + get_pts( &p_block->p_buffer[ offset +
                                    p_sys->i_Pts_Offset ] );
     if (p_sys->firstAudioPTS < 0)
         p_sys->firstAudioPTS = p_sys->lastAudioPTS;
@@ -691,7 +691,7 @@ static int DemuxRecVideo( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl
         {
             //msg_Dbg(p_demux, "Video PES hdr in pkt type 0x%02x at offset %d",
                 //subrec_type, esOffset1);
-            p_sys->lastVideoPTS = VLC_TS_0 + get_pts(
+            p_sys->lastVideoPTS = VLC_TICK_0 + get_pts(
                     &p_block_in->p_buffer[ esOffset1 + VIDEO_PTS_OFFSET ] );
             /*msg_Dbg(p_demux, "Video rec %d PTS %"PRId64, p_sys->i_cur_rec,
                         p_sys->lastVideoPTS );*/
@@ -868,7 +868,7 @@ static int DemuxRecAudio( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl
             }
             else
             {
-                p_sys->lastAudioPTS = VLC_TS_0 + get_pts(
+                p_sys->lastAudioPTS = VLC_TICK_0 + get_pts(
                     &p_sys->pes_buffer[ esOffset1 + p_sys->i_Pts_Offset ] );
                 p_block_in->i_pts = p_sys->lastAudioPTS;
             }
@@ -907,7 +907,7 @@ static int DemuxRecAudio( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl
         /* ================================================ */
         if ( ( esOffset1 == 0 ) && ( l_rec_size == 16 ) )
         {
-            p_sys->lastAudioPTS = VLC_TS_0 + get_pts( &p_block_in->p_buffer[
+            p_sys->lastAudioPTS = VLC_TICK_0 + get_pts( &p_block_in->p_buffer[
                         SA_PTS_OFFSET ] );
             if (p_sys->firstAudioPTS < 0)
                 p_sys->firstAudioPTS = p_sys->lastAudioPTS;
diff --git a/modules/demux/vc1.c b/modules/demux/vc1.c
index f75748d63b366802b8f7535fe37669f1e5405265..d43239b32e1baf0f198aa6e431330522952f4539 100644
--- a/modules/demux/vc1.c
+++ b/modules/demux/vc1.c
@@ -151,8 +151,8 @@ static int Demux( demux_t *p_demux)
     else
     {
         /*  */
-        p_block_in->i_dts = VLC_TS_0;
-        p_block_in->i_pts = VLC_TS_0;
+        p_block_in->i_dts = VLC_TICK_0;
+        p_block_in->i_pts = VLC_TICK_0;
     }
 
     while( (p_block_out = p_sys->p_packetizer->pf_packetize( p_sys->p_packetizer,
@@ -170,9 +170,9 @@ static int Demux( demux_t *p_demux)
                 p_sys->p_es = es_out_Add( p_demux->out, &p_sys->p_packetizer->fmt_out);
             }
 
-            es_out_SetPCR( p_demux->out, VLC_TS_0 + p_sys->i_dts );
-            p_block_out->i_dts = VLC_TS_0 + p_sys->i_dts;
-            p_block_out->i_pts = VLC_TS_0 + p_sys->i_dts;
+            es_out_SetPCR( p_demux->out, VLC_TICK_0 + p_sys->i_dts );
+            p_block_out->i_dts = VLC_TICK_0 + p_sys->i_dts;
+            p_block_out->i_pts = VLC_TICK_0 + p_sys->i_dts;
 
             es_out_Send( p_demux->out, p_sys->p_es, p_block_out );
 
diff --git a/modules/demux/vobsub.c b/modules/demux/vobsub.c
index 7d8afcba9ebd74c2580cd761da1d9e9e8fe8ef3d..c1e78e0e2290410cca6fd59c3c2bfed0724a41ce 100644
--- a/modules/demux/vobsub.c
+++ b/modules/demux/vobsub.c
@@ -411,7 +411,7 @@ static int Demux( demux_t *p_demux )
             p_block->i_buffer = i_read;
 
             /* pts */
-            p_block->i_pts = VLC_TS_0 + tk.p_subtitles[tk.i_current_subtitle].i_start;
+            p_block->i_pts = VLC_TICK_0 + tk.p_subtitles[tk.i_current_subtitle].i_start;
 
             /* demux this block */
             DemuxVobSub( p_demux, p_block );
diff --git a/modules/demux/voc.c b/modules/demux/voc.c
index faa3b494956eea6e65752677ed341337a3949995..624045b972c0f6cbeaf099bb55352b0f83872f3c 100644
--- a/modules/demux/voc.c
+++ b/modules/demux/voc.c
@@ -511,7 +511,7 @@ static int Demux( demux_t *p_demux )
         p_sys->i_silence_countdown -= i_read_frames;
     }
 
-    p_block->i_dts = p_block->i_pts = VLC_TS_0 + date_Get( &p_sys->pts );
+    p_block->i_dts = p_block->i_pts = VLC_TICK_0 + date_Get( &p_sys->pts );
     p_block->i_nb_samples = i_read_frames * p_sys->fmt.audio.i_frame_length;
     date_Increment( &p_sys->pts, p_block->i_nb_samples );
     es_out_SetPCR( p_demux->out, p_block->i_pts );
diff --git a/modules/demux/wav.c b/modules/demux/wav.c
index fd1a3b4325b884c4baecc46eb5b6866e702e77f7..ca06d98b224521e3be47358388bcf2733647fdc8 100644
--- a/modules/demux/wav.c
+++ b/modules/demux/wav.c
@@ -474,7 +474,7 @@ static int Demux( demux_t *p_demux )
     }
 
     p_block->i_dts =
-    p_block->i_pts = VLC_TS_0 + date_Get( &p_sys->pts );
+    p_block->i_pts = VLC_TICK_0 + date_Get( &p_sys->pts );
 
     /* set PCR */
     es_out_SetPCR( p_demux->out, p_block->i_pts );
diff --git a/modules/demux/webvtt.c b/modules/demux/webvtt.c
index 48e619b86b9f96f62476f42de229f961d9d99fd1..06e892adcad92a432e4f31a45e1a32903341ab79 100644
--- a/modules/demux/webvtt.c
+++ b/modules/demux/webvtt.c
@@ -277,16 +277,16 @@ static void StreamParserCueDoneHandler( void *priv, webvtt_cue_t *p_cue )
         {
             if ( p_sys->b_first_time )
             {
-                es_out_SetPCR( p_demux->out, p_cue->i_start + VLC_TS_0 );
+                es_out_SetPCR( p_demux->out, p_cue->i_start + VLC_TICK_0 );
                 p_sys->b_first_time = false;
             }
             p_sys->i_next_demux_time = p_cue->i_start;
             p_block->i_dts =
-                    p_block->i_pts = VLC_TS_0 + p_cue->i_start;
+                    p_block->i_pts = VLC_TICK_0 + p_cue->i_start;
             if( p_cue->i_stop >= 0 && p_cue->i_stop >= p_cue->i_start )
                 p_block->i_length = p_cue->i_stop - p_cue->i_start;
             es_out_Send( p_demux->out, p_sys->es, p_block );
-            es_out_SetPCR( p_demux->out, p_cue->i_start + VLC_TS_0 );
+            es_out_SetPCR( p_demux->out, p_cue->i_start + VLC_TICK_0 );
         }
     }
     webvtt_cue_Clean( p_cue );
@@ -497,7 +497,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         case DEMUX_SET_NEXT_DEMUX_TIME:
             p_sys->b_slave = true;
-            p_sys->i_next_demux_time = va_arg( args, int64_t ) - VLC_TS_0;
+            p_sys->i_next_demux_time = va_arg( args, int64_t ) - VLC_TICK_0;
             return VLC_SUCCESS;
 
         case DEMUX_GET_PTS_DELAY:
@@ -564,7 +564,7 @@ static int Demux( demux_t *p_demux )
         if( p_block )
         {
             p_block->i_length = i_end_time - i_start_time;
-            p_block->i_dts = p_block->i_pts = VLC_TS_0 + i_start_time;
+            p_block->i_dts = p_block->i_pts = VLC_TICK_0 + i_start_time;
 
             if( p_sys->i_next_block_flags )
             {
@@ -591,7 +591,7 @@ static int Demux( demux_t *p_demux )
 
     if ( !p_sys->b_slave )
     {
-        es_out_SetPCR( p_demux->out, VLC_TS_0 + i_barrier );
+        es_out_SetPCR( p_demux->out, VLC_TICK_0 + i_barrier );
         p_sys->i_next_demux_time += CLOCK_FREQ;
     }
 
diff --git a/modules/demux/xa.c b/modules/demux/xa.c
index 0df8abcb9248bc688219a41b73a8daa25556582b..6400895fd9ac23740cc6eb44a9e0d67227b56f14 100644
--- a/modules/demux/xa.c
+++ b/modules/demux/xa.c
@@ -151,7 +151,7 @@ static int Open( vlc_object_t * p_this )
     p_sys->p_es = es_out_Add( p_demux->out, &fmt );
 
     date_Init( &p_sys->pts, fmt.audio.i_rate, 1 );
-    date_Set( &p_sys->pts, VLC_TS_0 );
+    date_Set( &p_sys->pts, VLC_TICK_0 );
 
     p_demux->pf_demux   = Demux;
     p_demux->pf_control = Control;
diff --git a/modules/packetizer/flac.h b/modules/packetizer/flac.h
index b0de9bcc41961460fdb7c192ac72bc86ca4acfbd..8e73833edfc3b6c78e5735767e82a1290f50dfe1 100644
--- a/modules/packetizer/flac.h
+++ b/modules/packetizer/flac.h
@@ -290,10 +290,10 @@ static inline int FLAC_ParseSyncInfo(const uint8_t *p_buf, unsigned i_buf,
     if ( (p_buf[1] & 0x01) == 0  ) /* Fixed blocksize stream / Frames */
     {
         const unsigned fixedblocksize = stream_info ? stream_info->min_blocksize : blocksize;
-        h->i_pts = VLC_TS_0 + CLOCK_FREQ * fixedblocksize * i_fsnumber / samplerate;
+        h->i_pts = VLC_TICK_0 + CLOCK_FREQ * fixedblocksize * i_fsnumber / samplerate;
     }
     else /* Variable blocksize stream / Samples */
-        h->i_pts = VLC_TS_0 + CLOCK_FREQ * i_fsnumber / samplerate;
+        h->i_pts = VLC_TICK_0 + CLOCK_FREQ * i_fsnumber / samplerate;
 
     h->i_bits_per_sample = bits_per_sample;
     h->i_rate = samplerate;
diff --git a/modules/packetizer/mpegvideo.c b/modules/packetizer/mpegvideo.c
index 462f1115be6fd531ccdf43021094c7442aa1e0a6..00b292a8361f91ea9deb74524bad58e7daef755e 100644
--- a/modules/packetizer/mpegvideo.c
+++ b/modules/packetizer/mpegvideo.c
@@ -437,7 +437,7 @@ static block_t *OutputFrame( decoder_t *p_dec )
                 {
                     if( date_Get( &p_sys->dts ) == VLC_TICK_INVALID )
                     {
-                        date_Set( &p_sys->dts, VLC_TS_0 );
+                        date_Set( &p_sys->dts, VLC_TICK_0 );
                     }
                 }
             }
diff --git a/modules/video_filter/fps.c b/modules/video_filter/fps.c
index 2c9e6940a318d605695f4200fb7e8d56db9659fa..cb4ef36db89c672ff0b6cea844aac5e0cc696237 100644
--- a/modules/video_filter/fps.c
+++ b/modules/video_filter/fps.c
@@ -73,7 +73,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_picture)
     /* If input picture doesn't have actual valid timestamp,
         we don't really have currently a way to know what else
         to do with it other than drop it for now*/
-    if( unlikely( p_picture->date < VLC_TS_0) )
+    if( unlikely( p_picture->date < VLC_TICK_0) )
     {
         msg_Dbg( p_filter, "skipping non-dated picture");
         picture_Release( p_picture );
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 8dfe4f5419cb7980d6d1b43173a5e991fde3b40b..7eca0de2fdf298b9b1555fb3bc9d1ce2aa271a36 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -360,7 +360,7 @@ int aout_DecPlay (audio_output_t *aout, block_t *block, int input_rate)
 
     assert (input_rate >= INPUT_RATE_DEFAULT / AOUT_MAX_INPUT_RATE);
     assert (input_rate <= INPUT_RATE_DEFAULT * AOUT_MAX_INPUT_RATE);
-    assert (block->i_pts >= VLC_TS_0);
+    assert (block->i_pts >= VLC_TICK_0);
 
     block->i_length = CLOCK_FREQ * block->i_nb_samples
                                  / owner->input_format.i_rate;
diff --git a/src/misc/background_worker.c b/src/misc/background_worker.c
index ec6be8bc92e6b58bb7cc928334951d6440623f59..bcdf65e73870229fd909be8e37bc330e3eb27d64 100644
--- a/src/misc/background_worker.c
+++ b/src/misc/background_worker.c
@@ -74,7 +74,7 @@ static void* Thread( void* data )
                 vlc_array_remove( &worker->tail.data, 0 );
             }
 
-            if( worker->head.deadline == VLC_TS_0 && item == NULL )
+            if( worker->head.deadline == VLC_TICK_0 && item == NULL )
                 worker->head.active = false;
             worker->head.id = item ? item->id : NULL;
             vlc_cond_broadcast( &worker->head.wait );
@@ -86,7 +86,7 @@ static void* Thread( void* data )
                 else
                     worker->head.deadline = INT64_MAX;
             }
-            else if( worker->head.deadline != VLC_TS_0 )
+            else if( worker->head.deadline != VLC_TICK_0 )
             {
                 /* Wait 1 seconds for new inputs before terminating */
                 vlc_tick_t deadline = mdate() + INT64_C(1000000);
@@ -96,7 +96,7 @@ static void* Thread( void* data )
                 {
                     /* Timeout: if there is still no items, the thread will be
                      * terminated at next loop iteration (active = false). */
-                    worker->head.deadline = VLC_TS_0;
+                    worker->head.deadline = VLC_TICK_0;
                 }
                 continue;
             }
@@ -173,7 +173,7 @@ static void BackgroundWorkerCancel( struct background_worker* worker, void* id)
     while( ( id == NULL && worker->head.active )
         || ( id != NULL && worker->head.id == id ) )
     {
-        worker->head.deadline = VLC_TS_0;
+        worker->head.deadline = VLC_TICK_0;
         vlc_cond_signal( &worker->head.worker_wait );
         vlc_cond_signal( &worker->tail.wait );
         vlc_cond_wait( &worker->head.wait, &worker->lock );