[vlc-commits] transcode: NULL check

Rémi Denis-Courmont git at videolan.org
Wed Apr 23 19:09:08 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 23 20:08:59 2014 +0300| [8587d92aa3c702eae07fb7a766976faa86b1056a] | committer: Rémi Denis-Courmont

transcode: NULL check

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

 modules/stream_out/transcode/spu.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/stream_out/transcode/spu.c b/modules/stream_out/transcode/spu.c
index ccdeca1..50d9e2d 100644
--- a/modules/stream_out/transcode/spu.c
+++ b/modules/stream_out/transcode/spu.c
@@ -40,7 +40,8 @@ static subpicture_t *spu_new_buffer( decoder_t *p_dec,
 {
     VLC_UNUSED( p_dec );
     subpicture_t *p_subpicture = subpicture_New( p_upd );
-    p_subpicture->b_subtitle = true;
+    if( likely(p_subpicture != NULL) )
+        p_subpicture->b_subtitle = true;
     return p_subpicture;
 }
 



More information about the vlc-commits mailing list