[vlc-devel] [PATCH] core/picture: use visible size in picture_Export

Rémi Denis-Courmont remi at remlab.net
Fri Dec 23 17:48:02 CET 2016


Le torstaina 22. joulukuuta 2016, 18.14.11 EET Thomas Guillem a écrit :
> Fix #16789
> ---
>  src/misc/picture.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/src/misc/picture.c b/src/misc/picture.c
> index 43207ce..45f0406 100644
> --- a/src/misc/picture.c
> +++ b/src/misc/picture.c
> @@ -408,13 +408,15 @@ int picture_Export( vlc_object_t *p_obj,
>      unsigned int i_original_height;
>      if( fmt_in.i_sar_num >= fmt_in.i_sar_den )
>      {
> -        i_original_width = (int64_t)fmt_in.i_width * fmt_in.i_sar_num /
> fmt_in.i_sar_den; -        i_original_height = fmt_in.i_height;
> +        i_original_width = (int64_t)fmt_in.i_visible_width *
> fmt_in.i_sar_num +                         / fmt_in.i_sar_den;
> +        i_original_height = fmt_in.i_visible_height;
>      }
>      else
>      {
> -        i_original_width =  fmt_in.i_width;
> -        i_original_height = (int64_t)fmt_in.i_height * fmt_in.i_sar_den /
> fmt_in.i_sar_num; +        i_original_width =  fmt_in.i_visible_width;
> +        i_original_height = (int64_t)fmt_in.i_visible_height *
> fmt_in.i_sar_den +                          / fmt_in.i_sar_num;
>      }
> 
>      /* */

Any reason not to modify the following lines too?

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list