diff options
author | Harish Mahendrakar <harish.mahendrakar@ittiam.com> | 2015-10-02 15:58:13 +0530 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-07 12:10:51 -0800 |
commit | 6b2c4da08c49caf188b560cbf82cb20c37af7500 (patch) | |
tree | 9c04280ce9663efc5425824e3374a06c9ed20eba | |
parent | c565004958077646a7c8d7e44f1802c8daca5ec8 (diff) | |
download | android_external_libavc-6b2c4da08c49caf188b560cbf82cb20c37af7500.tar.gz android_external_libavc-6b2c4da08c49caf188b560cbf82cb20c37af7500.tar.bz2 android_external_libavc-6b2c4da08c49caf188b560cbf82cb20c37af7500.zip |
Decoder: Exit gracefully in case of allocation failure
Skip error concealment when allocation fails for decoder buffers
Change-Id: I785f31cad5dca52c8c67cba78cdd330b7b4539e1
-rw-r--r-- | decoder/ih264d_api.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/decoder/ih264d_api.c b/decoder/ih264d_api.c index 5442dae..ddbf769 100644 --- a/decoder/ih264d_api.c +++ b/decoder/ih264d_api.c @@ -2005,6 +2005,7 @@ WORD32 ih264d_video_decode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op) api_ret_value = IV_FAIL; if((ret == IVD_RES_CHANGED) + || (ret == IVD_MEM_ALLOC_FAILED) || (ret == ERROR_UNAVAIL_PICBUF_T) || (ret == ERROR_UNAVAIL_MVBUF_T)) { @@ -2060,6 +2061,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) + && (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) { // last slice - missing/corruption @@ -2086,6 +2088,7 @@ WORD32 ih264d_video_decode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op) } if((ret == IVD_RES_CHANGED) + || (ret == IVD_MEM_ALLOC_FAILED) || (ret == ERROR_UNAVAIL_PICBUF_T) || (ret == ERROR_UNAVAIL_MVBUF_T)) { |