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

Steve Lhomme robux4 at ycbcr.xyz
Wed Nov 4 12:41:39 CET 2020


On 2020-11-04 11:41, "zhilizhao(赵志立)" wrote:
> 
> 
>> On Nov 4, 2020, at 6:31 PM, Francois Cartegnie <fcvlcdev at free.fr 
>> <mailto:fcvlcdev at free.fr>> wrote:
>>
>> Le 04/11/2020 à 08:00, Steve Lhomme a écrit :
>>> ---
>>>  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;
>>> +        }
>>> +
>>
>> This is overriding the demuxer values
> 
> H.264 packtizer override sar too. Isn’t it the point to use a packtizer? 
> Or check
> fmt sar before overriding?

Yes that's what I got it from. But I agree with Francois, it should only 
be applied if the demuxer didn't force a value.


More information about the vlc-devel mailing list