Commit 34f69d64 authored by Clément Stenac's avatar Clément Stenac

Fix crash in subpictures rendering

parent 90e5abe9
......@@ -528,10 +528,9 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
p_fmt->i_height;
}
if (p_subpic->p_region->fmt.i_aspect == 0)
if ( p_region && p_subpic->p_region->fmt.i_aspect == 0 )
/* Set subtitle to be the same aspect ratio as the background
source video.
*/
source video. */
p_subpic->p_region->fmt.i_aspect = p_pic_src->format.i_aspect;
i_scale_width = i_scale_width_orig;
......@@ -547,8 +546,8 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
}
/* Take care of the aspect ratio */
if( p_subpic->p_region->fmt.i_aspect != p_pic_src->format.i_aspect)
if( p_region && p_subpic->p_region->fmt.i_aspect !=
p_pic_src->format.i_aspect)
{
i_scale_width = (p_subpic->p_region->fmt.i_aspect*1000) /
p_pic_src->format.i_aspect;
......
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