diff mbox series

[FFmpeg-devel,v2,2/2] hevc_ps: fix fixed_rate check

Message ID 20230910152522.27429-4-llyyr.public@gmail.com
State Accepted
Commit ded4478b8b6dbe939113b38df53778972e3af70e
Headers show
Series [FFmpeg-devel,v2,1/2] hevc_ps: fix cpb_cnt_minus1 initialization | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

llyyr Sept. 10, 2023, 3:25 p.m. UTC
Fixes: fc429d785e9e24c5520ce716d4bc3b5547e581eb

Since fc429d785e9e24c5520ce716d4bc3b5547e581eb splits the fixed_rate
flag into general and within_cvs, check for both.
---
 libavcodec/hevc_ps.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Lynne Sept. 10, 2023, 3:32 p.m. UTC | #1
Sep 10, 2023, 17:26 by llyyr.public@gmail.com:

> Fixes: fc429d785e9e24c5520ce716d4bc3b5547e581eb
>
> Since fc429d785e9e24c5520ce716d4bc3b5547e581eb splits the fixed_rate
> flag into general and within_cvs, check for both.
> ---
>  libavcodec/hevc_ps.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
> index ac3fe55b07..7507d2bf9c 100644
> --- a/libavcodec/hevc_ps.c
> +++ b/libavcodec/hevc_ps.c
> @@ -409,7 +409,8 @@ static int decode_hrd(GetBitContext *gb, int common_inf_present,
>  if (!hdr->flags.fixed_pic_rate_general_flag)
>  hdr->flags.fixed_pic_rate_within_cvs_flag = get_bits1(gb);
>  
> -        if (hdr->flags.fixed_pic_rate_within_cvs_flag)
> +        if (hdr->flags.fixed_pic_rate_within_cvs_flag ||
> +            hdr->flags.fixed_pic_rate_general_flag)
>  hdr->elemental_duration_in_tc_minus1[i] = get_ue_golomb_long(gb);
>  else
>  hdr->flags.low_delay_hrd_flag = get_bits1(gb);
>

Both patches lgtm
Thanks
Derek Buitenhuis Sept. 10, 2023, 7:06 p.m. UTC | #2
On 9/10/2023 4:32 PM, Lynne wrote:
> Both patches lgtm

Pushed.
diff mbox series

Patch

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index ac3fe55b07..7507d2bf9c 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -409,7 +409,8 @@  static int decode_hrd(GetBitContext *gb, int common_inf_present,
         if (!hdr->flags.fixed_pic_rate_general_flag)
             hdr->flags.fixed_pic_rate_within_cvs_flag = get_bits1(gb);
 
-        if (hdr->flags.fixed_pic_rate_within_cvs_flag)
+        if (hdr->flags.fixed_pic_rate_within_cvs_flag ||
+            hdr->flags.fixed_pic_rate_general_flag)
             hdr->elemental_duration_in_tc_minus1[i] = get_ue_golomb_long(gb);
         else
             hdr->flags.low_delay_hrd_flag = get_bits1(gb);