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

Romain Vimont rom1v at videolabs.io
Thu Nov 5 15:16:19 CET 2020


LGTM

On Wed, Nov 04, 2020 at 01:41:38PM +0100, Steve Lhomme wrote:
> ---
>  modules/packetizer/hevc.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/modules/packetizer/hevc.c b/modules/packetizer/hevc.c
> index 33765c38d20..73f9a243e88 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;
> -- 
> 2.26.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list