Commit 48cecf7c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

OpenCV: do not assume picture is at p_data_orig

This seems quite wrong to me, but untested.
parent 2a9b3101
...@@ -139,9 +139,6 @@ static void CloseFilter( vlc_object_t *p_this ) ...@@ -139,9 +139,6 @@ static void CloseFilter( vlc_object_t *p_this )
/**************************************************************************** /****************************************************************************
* Filter: Check for faces and raises an event when one is found. * Filter: Check for faces and raises an event when one is found.
****************************************************************************
* p_pic: A picture_t with its p_data_orig member set to an array of
* IplImages (one image for each picture_t plane).
****************************************************************************/ ****************************************************************************/
static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
{ {
...@@ -156,13 +153,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) ...@@ -156,13 +153,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
msg_Err( p_filter, "no image array" ); msg_Err( p_filter, "no image array" );
return NULL; return NULL;
} }
if (!(p_pic->p_data_orig))
{
msg_Err( p_filter, "no image array" );
return NULL;
}
//(hack) cast the picture_t to array of IplImage* //(hack) cast the picture_t to array of IplImage*
p_img = (IplImage**) p_pic->p_data_orig; p_img = (IplImage**) p_pic->p[0].p_pixels;
i_planes = p_pic->i_planes; i_planes = p_pic->i_planes;
//check the image array for validity //check the image array for validity
......
...@@ -509,7 +509,6 @@ static void VlcPictureToIplImage( vout_thread_t *p_vout, picture_t *p_in ) ...@@ -509,7 +509,6 @@ static void VlcPictureToIplImage( vout_thread_t *p_vout, picture_t *p_in )
//Hack the above opencv image array into a picture_t so that it can be sent to //Hack the above opencv image array into a picture_t so that it can be sent to
//another video filter //another video filter
p_sys->hacked_pic.p_data_orig = p_sys->p_cv_image;
p_sys->hacked_pic.i_planes = planes; p_sys->hacked_pic.i_planes = planes;
p_sys->hacked_pic.format.i_chroma = fmt_out.i_chroma; p_sys->hacked_pic.format.i_chroma = fmt_out.i_chroma;
......
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