[vlc-devel] [PATCH] core/picture: use visible size in picture_Export
Thomas Guillem
thomas at gllm.fr
Wed Dec 28 08:59:45 CET 2016
On Fri, Dec 23, 2016, at 17:48, Rémi Denis-Courmont wrote:
> 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?
Oh I missed it...
One other question: should we do like vout_update_format() in
input/decoder.c, use i_width/height if i_visible_width/height is 0.
Are there some modules that still don't fill the visible size ?
>
> --
> 雷米‧德尼-库尔蒙
> https://www.remlab.net/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list