summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHamsalekha S <hamsalekha.s@ittiam.com>2017-06-22 16:55:28 +0530
committerDan Pasanen <dan.pasanen@gmail.com>2017-11-15 13:55:55 -0600
commit23d7d145843a30cd1ffe836f85e23eb470ff73b0 (patch)
treecac371ddafa2546f14987c3ae69fc7617b3b462f
parent2170933bdb958f45dbe9690bb2f4545bfd787be4 (diff)
downloadandroid_external_libavc-23d7d145843a30cd1ffe836f85e23eb470ff73b0.tar.gz
android_external_libavc-23d7d145843a30cd1ffe836f85e23eb470ff73b0.tar.bz2
android_external_libavc-23d7d145843a30cd1ffe836f85e23eb470ff73b0.zip
Decoder: Conceal picture only if valid picture buffer is obtained.
If all the slices in the current pic were invalid, then the decoder would not have received a valid picture buffer in the current call. In such cases there is no need to conceal or deblock the picture. Bug: 62896384 Test: run ASAN-enabled PoC before/after the patch Change-Id: I3cf6e871592826f93b0dcd2b06fff80677bc8338 (cherry picked from commit 5df744afde273bc4d0f7a499581dd2fb2ae6cb45)
-rw-r--r--decoder/ih264d_api.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/decoder/ih264d_api.c b/decoder/ih264d_api.c
index 7c3f750..d86aaee 100644
--- a/decoder/ih264d_api.c
+++ b/decoder/ih264d_api.c
@@ -2239,7 +2239,7 @@ WORD32 ih264d_video_decode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op)
}
while(( header_data_left == 1)||(frame_data_left == 1));
- if((ps_dec->u4_slice_start_code_found == 1)
+ if((ps_dec->u4_pic_buf_got == 1)
&& (ret != IVD_MEM_ALLOC_FAILED)
&& ps_dec->u2_total_mbs_coded < ps_dec->u2_frm_ht_in_mbs * ps_dec->u2_frm_wd_in_mbs)
{
@@ -2381,7 +2381,7 @@ WORD32 ih264d_video_decode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op)
}
- if((ps_dec->u4_slice_start_code_found == 1)
+ if((ps_dec->u4_pic_buf_got == 1)
&& (ERROR_DANGLING_FIELD_IN_PIC != i4_err_status))
{
/*
@@ -2407,8 +2407,7 @@ WORD32 ih264d_video_decode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op)
/* if new frame in not found (if we are still getting slices from previous frame)
* ih264d_deblock_display is not called. Such frames will not be added to reference /display
*/
- if (((ps_dec->ps_dec_err_status->u1_err_flag & REJECT_CUR_PIC) == 0)
- && (ps_dec->u4_pic_buf_got == 1))
+ if ((ps_dec->ps_dec_err_status->u1_err_flag & REJECT_CUR_PIC) == 0)
{
/* Calling Function to deblock Picture and Display */
ret = ih264d_deblock_display(ps_dec);