[vlc-commits] [Git][videolan/vlc][master] vout: fix potential SIGSEGV after Flush

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Jan 10 16:46:47 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
faaef959 by Thomas Guillem at 2024-01-10T15:53:18+00:00
vout: fix potential SIGSEGV after Flush

Thread 90 "vlc-vout" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff2bfff6c0 (LWP 201222)]
(gdb) bt
 #0  0x00007ffff7cfa36a in vlc_atomic_rc_inc (rc=0x168) at ../../include/vlc_atomic.h:60
 #1  picture_Hold (picture=0x0) at ../../include/vlc_picture.h:362
 #2  FilterPictureInteractive (sys=0x7fff0c006480) at ../../src/video_output/video_output.c:1102
 #3  RenderPicture (sys=sys at entry=0x7fff0c006480, render_now=render_now at entry=true)
    at ../../src/video_output/video_output.c:1292
 #4  0x00007ffff7cfb59b in DisplayPicture (vout=0x7fff0c006480) at ../../src/video_output/video_output.c:1509
 #5  Thread (object=0x7fff0c006480) at ../../src/video_output/video_output.c:1825
 #6  0x00007ffff7e27044 in  () at /lib/x86_64-linux-gnu/libc.so.6
 #7  0x00007ffff7ea761c in  () at /lib/x86_64-linux-gnu/libc.so.6

wait_interrupted == true assumed that displayed.current was valid.

An other way of fixing this issue is to reset wait_interrupted = false,
on Flush.

- - - - -


1 changed file:

- src/video_output/video_output.c


Changes:

=====================================
src/video_output/video_output.c
=====================================
@@ -1509,7 +1509,8 @@ static vlc_tick_t DisplayPicture(vout_thread_sys_t *vout)
     else if (sys->wait_interrupted)
     {
         sys->wait_interrupted = false;
-        RenderPicture(vout, true);
+        if (likely(sys->displayed.current != NULL))
+            RenderPicture(vout, true);
         return VLC_TICK_INVALID;
     }
     else if (likely(sys->displayed.date != VLC_TICK_INVALID))



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

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/faaef959f8853e0806c335a64f87aaf9ba867cfe
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