summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2016-02-01 15:08:19 +0530
committerThe Android Automerger <android-build@google.com>2016-03-01 15:25:08 -0800
commit50a580a2f581cac3de9603fc204ccdd985414179 (patch)
tree14c8b819ac6b2838b54ae55fe52348faca0c117d
parent64112d21e356f999c7c8e4d11fbdaee29898f931 (diff)
downloadandroid_external_libavc-50a580a2f581cac3de9603fc204ccdd985414179.tar.gz
android_external_libavc-50a580a2f581cac3de9603fc204ccdd985414179.tar.bz2
android_external_libavc-50a580a2f581cac3de9603fc204ccdd985414179.zip
Ensure ih264d_start_of_pic() is not repeated in ih264d_mark_err_slice_skip()
In case of error in handling MMCO commpands/reference list creation, ih264d_start_of_pic() was called again in ih264d_mark_err_slice_skip() resulting in leaking a picture or an MV buffer in buffer manager. To fix this, ensure prev_slice_err is set to 1 only if u4_pic_buf_got is zero, before calling ih264d_mark_err_slice_skip() at the end of picture decode. This will ensure ih264d_start_of_pic() is not repeated Bug: 25818142 Change-Id: I7d5a9179533581eec663bc6a19a2901e7cce6af3
-rw-r--r--decoder/ih264d_api.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/decoder/ih264d_api.c b/decoder/ih264d_api.c
index cd91483..c264d9a 100644
--- a/decoder/ih264d_api.c
+++ b/decoder/ih264d_api.c
@@ -2085,7 +2085,7 @@ WORD32 ih264d_video_decode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op)
num_mb_skipped = (ps_dec->u2_frm_ht_in_mbs * ps_dec->u2_frm_wd_in_mbs)
- ps_dec->u2_total_mbs_coded;
- if(ps_dec->u4_first_slice_in_pic)
+ if(ps_dec->u4_first_slice_in_pic && (ps_dec->u4_pic_buf_got == 0))
prev_slice_err = 1;
else
prev_slice_err = 2;
@@ -2112,8 +2112,11 @@ WORD32 ih264d_video_decode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op)
{
ih264d_signal_bs_deblk_thread(ps_dec);
}
- /* dont consume bitstream */
- ps_dec_op->u4_num_bytes_consumed -= bytes_consumed;
+ /* dont consume bitstream for change in resolution case */
+ if(ret == IVD_RES_CHANGED)
+ {
+ ps_dec_op->u4_num_bytes_consumed -= bytes_consumed;
+ }
return IV_FAIL;
}