diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c index 0b32f55f51185ebbfb456a0ccf9b128ca55ccc5b..ca9e32d802de251f40f7780fd32aa86b9d5d9f10 100644 --- a/src/video_output/vout_subpictures.c +++ b/src/video_output/vout_subpictures.c @@ -779,10 +779,16 @@ static size_t spu_channel_UpdateDates(struct spu_channel *channel, entry->orgstart, channel->rate, NULL); - entry->stop = - vlc_clock_ConvertToSystem(channel->clock, system_now, - entry->orgstop, channel->rate, - NULL); + if (entry->orgstop != VLC_TICK_INVALID) + { + entry->stop = vlc_clock_ConvertToSystem(channel->clock, + system_now, + entry->orgstop, + channel->rate, + NULL); + } + else + entry->stop = VLC_TICK_INVALID; } vlc_clock_Unlock(channel->clock); @@ -2133,9 +2139,13 @@ void spu_PutSubpicture(spu_t *spu, subpicture_t *subpic) subpic->i_start = vlc_clock_ConvertToSystem(channel->clock, system_now, orgstart, channel->rate, NULL); - subpic->i_stop = - vlc_clock_ConvertToSystem(channel->clock, system_now, + if (orgstop != VLC_TICK_INVALID) + { + subpic->i_stop = + vlc_clock_ConvertToSystem(channel->clock, system_now, orgstop, channel->rate, NULL); + } + vlc_clock_Unlock(channel->clock); spu_channel_EarlyRemoveLate(sys, channel, system_now);