Commit f5a31fb7 authored by Rémi Duraffort's avatar Rémi Duraffort

We must not return the picture directly but copy it (in case we're not

modifying anything).
parent b50e987e
......@@ -290,21 +290,22 @@ static picture_t *PostprocPict( filter_t *p_filter, picture_t *p_pic )
int i_plane;
int i_src_stride[3], i_dst_stride[3];
picture_t *p_outpic = filter_NewPicture( p_filter );
if( !p_outpic )
{
picture_Release( p_pic );
return NULL;
}
/* Lock to prevent issues if pp_mode is changed */
vlc_mutex_lock( &p_sys->lock );
if( !p_sys->pp_mode )
{
vlc_mutex_unlock( &p_sys->lock );
return p_pic;
picture_CopyPixels( p_outpic, p_pic );
return CopyInfoAndRelease( p_outpic, p_pic );
}
picture_t *p_outpic = filter_NewPicture( p_filter );
if( !p_outpic )
{
picture_Release( p_pic );
vlc_mutex_unlock( &p_sys->lock );
return NULL;
}
for( i_plane = 0; i_plane < p_pic->i_planes; i_plane++ )
{
......
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