[vlc-devel] [PATCH] packetizer: hevc: read the sample aspect ratio

Steve Lhomme robux4 at ycbcr.xyz
Wed Nov 4 08:00:39 CET 2020


---
 modules/packetizer/hevc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/packetizer/hevc.c b/modules/packetizer/hevc.c
index 33765c38d20..1142bea847a 100644
--- a/modules/packetizer/hevc.c
+++ b/modules/packetizer/hevc.c
@@ -630,6 +630,13 @@ static void ActivateSets(decoder_t *p_dec,
             }
         }
 
+        unsigned num, den;
+        if (hevc_get_aspect_ratio(p_sps, &num, &den))
+        {
+            p_dec->fmt_out.video.i_sar_num = num;
+            p_dec->fmt_out.video.i_sar_den = den;
+        }
+
         if(p_dec->fmt_in.i_profile == -1)
         {
             uint8_t i_profile, i_level;
-- 
2.26.2



More information about the vlc-devel mailing list