[vlc-commits] [Git][videolan/vlc][master] vout: remove unused paused parameter

Romain Vimont gitlab at videolan.org
Fri Jun 18 08:12:59 UTC 2021



Romain Vimont pushed to branch master at VideoLAN / VLC


Commits:
3d3e23fa by Romain Vimont at 2021-06-18T07:37:30+00:00
vout: remove unused paused parameter

The parameter "paused" was written but never read by the caller.
This is the case since f1bf7ce5b4480a3d38d54c7ae1d1564f0670d83f.

The comment above "*paused = true" says:

> (so that the current picture is displayed but not the next one)

Since then, the next picture has been removed by
4ec95bb1668140f7022736ca0221e13c2cac98a8, so the "paused" parameter can
be removed too.

- - - - -


1 changed file:

- src/video_output/video_output.c


Changes:

=====================================
src/video_output/video_output.c
=====================================
@@ -975,7 +975,7 @@ static bool IsPictureLate(vout_thread_sys_t *vout, picture_t *decoded,
 /* */
 VLC_USED
 static picture_t *PreparePicture(vout_thread_sys_t *vout, bool reuse_decoded,
-                                 bool frame_by_frame, bool *paused)
+                                 bool frame_by_frame)
 {
     vout_thread_sys_t *sys = vout;
     bool is_late_dropped = sys->is_late_dropped && !frame_by_frame;
@@ -1000,22 +1000,12 @@ static picture_t *PreparePicture(vout_thread_sys_t *vout, bool reuse_decoded,
                         vlc_clock_ConvertToSystem(sys->clock, system_now,
                                                   decoded->date, sys->rate);
 
-                    if (system_pts == INT64_MAX)
+                    if (system_pts != INT64_MAX &&
+                        IsPictureLate(vout, decoded, system_now, system_pts))
                     {
-                        /* The clock is paused, notify it (so that the current
-                         * picture is displayed but not the next one), this
-                         * current picture can't be be late. */
-                        *paused = true;
-                    }
-                    else
-                    {
-                        if (IsPictureLate(vout, decoded, system_now,
-                                                       system_pts))
-                        {
-                            picture_Release(decoded);
-                            vout_statistic_AddLost(&sys->statistic, 1);
-                            continue;
-                        }
+                        picture_Release(decoded);
+                        vout_statistic_AddLost(&sys->statistic, 1);
+                        continue;
                     }
                 }
                 vlc_video_context *pic_vctx = picture_GetVideoContext(decoded);
@@ -1390,7 +1380,7 @@ static int DisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
     if (frame_by_frame)
     {
         picture_t *next;
-        next = PreparePicture(vout, !sys->displayed.current, true, &paused);
+        next = PreparePicture(vout, !sys->displayed.current, true);
 
         if (next)
         {
@@ -1426,7 +1416,7 @@ static int DisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
         picture_t *next = NULL;
         if (first)
         {
-            next = PreparePicture(vout, true, false, &paused);
+            next = PreparePicture(vout, true, false);
             if (!next)
             {
                 *deadline = VLC_TICK_INVALID;
@@ -1444,7 +1434,7 @@ static int DisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
                 if (date_next <= system_now)
                 {
                     // the current frame will be late, look for the next not late one
-                    next = PreparePicture(vout, false, false, &paused);
+                    next = PreparePicture(vout, false, false);
                 }
             }
         }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3d3e23fa152a7f6500f4ff3f33b99250eaf17fb0

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3d3e23fa152a7f6500f4ff3f33b99250eaf17fb0
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list