[vlc-commits] [Git][videolan/vlc][master] 2 commits: vout_subpictures: fix timings when paused

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Nov 24 07:28:48 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b4a0da12 by Thomas Guillem at 2023-11-24T06:07:38+00:00
vout_subpictures: fix timings when paused

Fixes #28429

- - - - -
28ab04ec by Thomas Guillem at 2023-11-24T06:07:38+00:00
vout_subpictures: don't prerender when paused

- - - - -


1 changed file:

- src/video_output/vout_subpictures.c


Changes:

=====================================
src/video_output/vout_subpictures.c
=====================================
@@ -616,7 +616,7 @@ static size_t spu_channel_UpdateDates(struct spu_channel *channel,
 
         ts = vlc_clock_ConvertToSystemLocked(channel->clock, system_now,
                                              entry->orgstart, channel->rate);
-        if (ts != VLC_TICK_MAX) /* pause triggered before or during spu render */
+        if (ts != VLC_TICK_MAX)
         {
             entry->start = ts;
 
@@ -624,6 +624,19 @@ static size_t spu_channel_UpdateDates(struct spu_channel *channel,
                 vlc_clock_ConvertToSystemLocked(channel->clock, system_now,
                                                 entry->orgstop, channel->rate);
         }
+        else
+        {
+            /* Pause triggered before or during spu render */
+
+            /* If currently rendered, display the current spu until the end of
+             * the pause. */
+            entry->stop = VLC_TICK_MAX;
+
+            /* Delay the start date only if not currently rendered. */
+            if (entry->start > system_now)
+                entry->start = VLC_TICK_MAX;
+
+        }
     }
     vlc_clock_Unlock(channel->clock);
 
@@ -1972,7 +1985,8 @@ void spu_PutSubpicture(spu_t *spu, subpicture_t *subpic)
         subpicture_Delete(subpic);
         return;
     }
-    spu_PrerenderEnqueue(sys, subpic);
+    if (subpic->i_start != VLC_TICK_MAX) /* Don't prerender when paused */
+        spu_PrerenderEnqueue(sys, subpic);
     vlc_mutex_unlock(&sys->lock);
 }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ef576bbb27a8c57311fa64afc84fb4508b44199d...28ab04ecb9b8acbbf8de745dc458187738946da2

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ef576bbb27a8c57311fa64afc84fb4508b44199d...28ab04ecb9b8acbbf8de745dc458187738946da2
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list