[vlc-devel] [PATCH 7/7] video_output: return when the first frame is read in frame by frame mode

Steve Lhomme robux4 at ycbcr.xyz
Tue Oct 20 11:04:38 CEST 2020


It may be possible to start in frame by frame mode. Normally we read the next
frame and replace the current frame with it. But if there was no frame we
should return when the first frame is read, not when the second frame replaced
the first one.
---
 src/video_output/video_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 836dbe5a7aa..7092ffd06ed 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1490,7 +1490,7 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
         assert(!sys->displayed.next);
         sys->displayed.current =
             ThreadGetPrerenderedLocked(vout, true, !frame_by_frame, &paused);
-        if (!sys->displayed.current)
+        if (!sys->displayed.current || frame_by_frame)
         {
             vlc_mutex_unlock(&sys->filter.lock);
             return VLC_EGENERIC; // wait with no known deadline
-- 
2.26.2



More information about the vlc-devel mailing list