[vlc-commits] vout: don't assume there's a parent lock for SpuRenderText

Francois Cartegnie git at videolan.org
Tue Jul 7 20:34:01 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul  1 15:43:06 2020 +0200| [ca7a1ec7b04c2698ac39b07c3e4c557ae8eb91dc] | committer: Francois Cartegnie

vout: don't assume there's a parent lock for SpuRenderText

spu_Attach could occur before lock

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ca7a1ec7b04c2698ac39b07c3e4c557ae8eb91dc
---

 src/video_output/vout_subpictures.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index b7c6f6ea4a..3248c86bfc 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -313,10 +313,10 @@ static void SpuRenderText(spu_t *spu,
                           const vlc_fourcc_t *chroma_list)
 {
     spu_private_t *sys = spu->p;
-    filter_t *text = sys->text;
     assert(region->fmt.i_chroma == VLC_CODEC_TEXT);
 
     vlc_mutex_lock(&sys->textlock);
+    filter_t *text = sys->text;
     if(text)
     {
         // assume rendered text is in sRGB if nothing is set



More information about the vlc-commits mailing list