[vlc-commits] vout: fix spu check for public functions

Thomas Guillem git at videolan.org
Thu Jun 13 07:50:59 CEST 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jun 12 16:53:31 2019 +0200| [abd5b4b3bbaf32d76d8881947a8baa2d9b6d3438] | committer: Thomas Guillem

vout: fix spu check for public functions

vout_FlushSubpictureChannel() is public and can be called when we don't know if
the vout has any spu.

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

 src/video_output/video_output.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index e9c9da1305..131eb593d1 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -299,8 +299,8 @@ void vout_FlushSubpictureChannel( vout_thread_t *vout, size_t channel )
 {
     vout_thread_sys_t *sys = vout->p;
     assert(!sys->dummy);
-    assert(sys->spu);
-    spu_ClearChannel(vout->p->spu, channel);
+    if (sys->spu)
+        spu_ClearChannel(sys->spu, channel);
 }
 
 void vout_SetSpuHighlight( vout_thread_t *vout,



More information about the vlc-commits mailing list