[vlc-commits] opencv_filter: Don't crash VLC if no picture could be obtained
Edward Wang
git at videolan.org
Sun Aug 12 00:57:20 CEST 2012
vlc | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | 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 <jb at videolan.org>
> 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)
More information about the vlc-commits
mailing list