transcode: NULL check
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 23 Apr 2014 17:08:59 +0000 (20:08 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 23 Apr 2014 17:08:59 +0000 (20:08 +0300)
modules/stream_out/transcode/spu.c

index ccdeca1..50d9e2d 100644 (file)
@@ -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;
 }