[vlc-commits] Fixed potential NULL dereference when using video filter when transcoding.

Laurent Aimar git at videolan.org
Fri Jun 1 22:29:43 CEST 2012


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Jun  1 22:27:36 2012 +0200| [8dcf122757baafc6d84821772c0fecc3e72f71af] | committer: Laurent Aimar

Fixed potential NULL dereference when using video filter when transcoding.

It closes #4409.

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

 modules/stream_out/transcode/video.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 97f88ea..3ab053e 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -656,10 +656,14 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_t *id,
         /* Run filter chain */
         if( id->p_f_chain )
             p_pic = filter_chain_VideoFilter( id->p_f_chain, p_pic );
+        if( !p_pic )
+            continue;
 
         /* Run user specified filter chain */
         if( id->p_uf_chain )
             p_pic = filter_chain_VideoFilter( id->p_uf_chain, p_pic );
+        if( !p_pic )
+            continue;
 
         /*
          * Encoding



More information about the vlc-commits mailing list