[vlc-devel] [PATCH] core/picture: use visible size in picture_Export
Thomas Guillem
thomas at gllm.fr
Thu Dec 22 18:14:11 CET 2016
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;
}
/* */
--
2.10.2
More information about the vlc-devel
mailing list