[vlc-devel] [PATCH 2/7] video_output: don't apply the source aspect ratio as a cropping ratio

Rémi Denis-Courmont remi at remlab.net
Tue Sep 1 16:00:49 CEST 2020


Le tiistaina 1. syyskuuta 2020, 13.06.33 EEST Steve Lhomme a écrit :
> The value read for VOUT_CROP_RATIO should be applied to
> vout_SetDisplayCrop() not the source aspect ratio.
> 
> vout_SetDisplayAspect() always used "source.dar".
> 
> Regression introduced in 4563df98a188f4276d2529484d1b3f3dafb9182b
> ---
>  src/video_output/video_output.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/video_output/video_output.c
> b/src/video_output/video_output.c index 49a1e9653ad..5149059d2b4 100644
> --- a/src/video_output/video_output.c
> +++ b/src/video_output/video_output.c
> @@ -1760,8 +1760,6 @@ static int vout_Start(vout_thread_sys_t *vout,
> vlc_video_context *vctx, const vo break;
>      }
> 
> -    num = sys->source.dar.num;
> -    den = sys->source.dar.den;
>      vlc_mutex_lock(&sys->display_lock);
>      vlc_mutex_unlock(&sys->window_lock);
> 
> @@ -1778,6 +1776,8 @@ static int vout_Start(vout_thread_sys_t *vout,
> vlc_video_context *vctx, const vo
> 
>      vout_SetDisplayCrop(sys->display, num, den, x, y, w, h);
> 
> +    num = sys->source.dar.num;
> +    den = sys->source.dar.den;

AFACIT, this patch is replacing a variable aliasing problem with a thread 
safety problem :/

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list