diff --git a/src/video_output/vout_pictures.c b/src/video_output/vout_pictures.c index f659cd758e8af4619ab19b99b05468d0ee7e811b..a7ff57fbfb1b45736ce42613e09805f2281decc9 100644 --- a/src/video_output/vout_pictures.c +++ b/src/video_output/vout_pictures.c @@ -300,6 +300,8 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic, fmt.i_chroma = p_vout->output.i_chroma; fmt.i_width = p_vout->output.i_width; fmt.i_height = p_vout->output.i_height; + fmt.i_sar_num = p_vout->output.i_aspect * fmt.i_height / fmt.i_width; + fmt.i_sar_den = VOUT_ASPECT_FACTOR; i_scale_width = p_vout->output.i_width * 1000 / p_vout->render.i_width; i_scale_height = p_vout->output.i_height * 1000 / p_vout->render.i_height; diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c index bf1aca46839bc23251bc35102a16b04f281129e4..4237c72be8d6c20596042e5bea91078636050066 100644 --- a/src/video_output/vout_subpictures.c +++ b/src/video_output/vout_subpictures.c @@ -497,6 +497,15 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt, p_subpic->i_original_picture_height; } + /* Take care of the aspect ratio */ + if( p_region->fmt.i_sar_num * p_fmt->i_sar_den != + p_region->fmt.i_sar_den * p_fmt->i_sar_num ) + { + i_scale_width = i_scale_width * + (int64_t)p_region->fmt.i_sar_num * p_fmt->i_sar_den / + p_region->fmt.i_sar_den / p_fmt->i_sar_num; + } + /* Load the scaling module */ if( !p_spu->p_scale && (i_scale_width != 1000 || i_scale_height != 1000) )