Commit a1b9a848 authored by Laurent Aimar's avatar Laurent Aimar

Do not leak memory in case of multiple region inside a subpicture.

parent bbd39e8b
...@@ -998,10 +998,12 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt, ...@@ -998,10 +998,12 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
if( p_subpic->pf_update_regions ) if( p_subpic->pf_update_regions )
{ {
/* FIXME that part look like crap too if there is more than 1 region */ while( p_subpic->p_region )
{
if( p_subpic->p_region ) subpicture_region_t *p_region = p_subpic->p_region;
spu_DestroyRegion( p_spu, p_subpic->p_region ); p_subpic->p_region = p_region->p_next;
spu_DestroyRegion( p_spu, p_region );
}
/* TODO do not reverse the scaling that was done before calling /* TODO do not reverse the scaling that was done before calling
* spu_RenderSubpictures, just pass it along (or do it inside * spu_RenderSubpictures, just pass it along (or do it inside
......
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