[vlc-commits] packetizer: hevc: read the sample aspect ratio
Steve Lhomme
git at videolan.org
Fri Nov 6 08:01:50 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Nov 3 14:37:10 2020 +0100| [98a054ba97b2c947148a7b95becebf342671c499] | committer: Steve Lhomme
packetizer: hevc: read the sample aspect ratio
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=98a054ba97b2c947148a7b95becebf342671c499
---
modules/packetizer/hevc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/modules/packetizer/hevc.c b/modules/packetizer/hevc.c
index 33765c38d2..73f9a243e8 100644
--- a/modules/packetizer/hevc.c
+++ b/modules/packetizer/hevc.c
@@ -630,6 +630,16 @@ static void ActivateSets(decoder_t *p_dec,
}
}
+ if ( p_dec->fmt_in.video.i_sar_num == 0 || p_dec->fmt_in.video.i_sar_den == 0)
+ {
+ 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;
More information about the vlc-commits
mailing list