From 9e367524920f740dc5b5297159413cf68d1e4d37 Mon Sep 17 00:00:00 2001 From: Rakesh Kumar Date: Mon, 4 Nov 2024 21:08:00 +0530 Subject: [PATCH] libavc: Fix dynamic color aspects support Test: atest android.mediav2.cts.DecoderDynamicColorAspectTest Change-Id: Id64ddb874efe1ab51cd9b2359bfa9526bc1ccd6e --- decoder/ih264d_parse_headers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/decoder/ih264d_parse_headers.c b/decoder/ih264d_parse_headers.c index ee161d8..b013104 100644 --- a/decoder/ih264d_parse_headers.c +++ b/decoder/ih264d_parse_headers.c @@ -1096,9 +1096,9 @@ WORD32 ih264d_parse_sps(dec_struct_t *ps_dec, dec_bit_stream_t *ps_bitstrm) if(ret != OK) return ret; - if (ps_dec->pu1_bits_buf_dynamic != NULL) { + if (ps_dec->pu1_bits_buf_dynamic != NULL && ps_dec->ps_cur_sps != NULL) { vui_t *ps_vui = &ps_seq->s_vui; - dec_seq_params_t *ps_sps_old = ps_dec->ps_sps; + dec_seq_params_t *ps_sps_old = ps_dec->ps_cur_sps; vui_t *ps_vui_old = &ps_sps_old->s_vui; if (ps_vui->u1_video_full_range_flag != ps_vui_old->u1_video_full_range_flag ||