vlc | branch: master | Edward Wang <[email protected]> | Fri Aug 10 
13:25:46 2012 -0400| [af2ef762fd8de2d6fe3ee10fbfce8b89cba7383c] | committer: 
Jean-Baptiste Kempf

opencv_filter: Don't crash VLC if no picture could be obtained

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 modules/video_filter/opencv_wrapper.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/video_filter/opencv_wrapper.c 
b/modules/video_filter/opencv_wrapper.c
index 62d173e..15afc05 100644
--- a/modules/video_filter/opencv_wrapper.c
+++ b/modules/video_filter/opencv_wrapper.c
@@ -407,6 +407,11 @@ static void VlcPictureToIplImage( filter_t* p_filter, 
picture_t* p_in )
 static picture_t* Filter( filter_t* p_filter, picture_t* p_pic )
 {
     picture_t* p_outpic = filter_NewPicture( p_filter );
+    if( p_outpic == NULL ) {
+        msg_Err( p_filter, "couldn't get a p_outpic!" );
+        picture_Release( p_pic );
+        return NULL;
+    }
 
     // Make a copy if we want to show the original input
     if (p_filter->p_sys->i_wrapper_output == VINPUT)

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to