Commit af2ef762 authored by Edward Wang's avatar Edward Wang Committed by Jean-Baptiste Kempf

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

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent df7eecf6
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment