[vlc-commits] picture: copy the crop information in picture_Setup()
Steve Lhomme
git at videolan.org
Wed Sep 19 12:15:04 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Sep 17 10:39:40 2018 +0200| [3f5833c8172c715e118d2dca1e39de8aef2cd668] | committer: Steve Lhomme
picture: copy the crop information in picture_Setup()
It's done in picture_NewPrivate() but not here. So it ends up lost.
Ref: #21192
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3f5833c8172c715e118d2dca1e39de8aef2cd668
---
src/misc/picture.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/misc/picture.c b/src/misc/picture.c
index 0740f06c83..b08ac56a11 100644
--- a/src/misc/picture.c
+++ b/src/misc/picture.c
@@ -106,6 +106,11 @@ int picture_Setup( picture_t *p_picture, const video_format_t *restrict fmt )
video_format_Setup( &p_picture->format, fmt->i_chroma, fmt->i_width, fmt->i_height,
fmt->i_visible_width, fmt->i_visible_height,
fmt->i_sar_num, fmt->i_sar_den );
+ if( fmt->i_x_offset < fmt->i_width &&
+ fmt->i_y_offset < fmt->i_height &&
+ fmt->i_visible_width > 0 && fmt->i_x_offset + fmt->i_visible_width <= fmt->i_width &&
+ fmt->i_visible_height > 0 && fmt->i_y_offset + fmt->i_visible_height <= fmt->i_height )
+ video_format_CopyCrop( &p_picture->format, fmt );
const vlc_chroma_description_t *p_dsc =
vlc_fourcc_GetChromaDescription( p_picture->format.i_chroma );
More information about the vlc-commits
mailing list