[vlc-devel] [PATCH] vout: fix spu check for public functions
Thomas Guillem
thomas at gllm.fr
Wed Jun 12 16:55:12 CEST 2019
vout_FlushSubpictureChannel() is public and can be called when we don't know if
the vout has any spu.
---
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,
--
2.20.1
More information about the vlc-devel
mailing list