[vlc-devel] [PATCH 4/7] opencv_filter: Don't crash VLC if no picture could be obtained
Edward Wang
edward.c.wang at compdigitec.com
Fri Aug 10 19:25:46 CEST 2012
---
modules/video_filter/opencv_wrapper.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
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)
--
1.7.5.4
More information about the vlc-devel
mailing list