Commit 974ac77a authored by Laurent Aimar's avatar Laurent Aimar Committed by Antoine Cellerier

Fixed segfault when the subpicture scaler failed.

(cherry picked from commit ff6b945f)
parent f0324925
......@@ -785,11 +785,18 @@ static void SpuRenderRegion( spu_t *p_spu,
p_pic = p_scale->pf_video_filter( p_scale, &p_region->p_cache->picture );
else
msg_Err( p_spu, "scaling failed (module not loaded)" );
if( p_pic )
{
p_region->p_cache->picture = *p_pic;
free( p_pic );
}
else
{
p_subpic->pf_destroy_region( VLC_OBJECT(p_spu),
p_region->p_cache );
p_region->p_cache = NULL;
}
}
/* And use the scaled picture */
......
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