[vlc-devel] [PATCH] [RFC] avcodec: recover the source visible area when going through the decoder

Steve Lhomme robux4 at ycbcr.xyz
Mon Apr 16 09:33:14 CEST 2018


Fixes #12767
---
 modules/codec/avcodec/video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index b505d34846..b77f3d85c4 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -165,8 +165,8 @@ static int lavc_GetVideoFormat(decoder_t *dec, video_format_t *restrict fmt,
 
     fmt->i_width = width;
     fmt->i_height = height;
-    fmt->i_visible_width = ctx->width;
-    fmt->i_visible_height = ctx->height;
+    fmt->i_visible_width = dec->fmt_in.video.i_visible_width ? : (unsigned) ctx->width;
+    fmt->i_visible_height = dec->fmt_in.video.i_visible_height ? : (unsigned) ctx->height;
 
     /* If an aspect-ratio was specified in the input format then force it */
     if (dec->fmt_in.video.i_sar_num > 0 && dec->fmt_in.video.i_sar_den > 0)
-- 
2.16.2



More information about the vlc-devel mailing list