diff options
author | Harish Mahendrakar <harish.mahendrakar@ittiam.com> | 2015-10-02 15:58:13 +0530 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2015-10-16 19:29:43 +0000 |
commit | e027a11e31aaae2652a9d5a69a15f8748f6970cb (patch) | |
tree | 4789abce1e53a88fe48dcf9d082b6d42fc706de9 | |
parent | 5351d3a403c132d2dff1288d0794f6c15d695849 (diff) | |
download | android_external_libavc-e027a11e31aaae2652a9d5a69a15f8748f6970cb.tar.gz android_external_libavc-e027a11e31aaae2652a9d5a69a15f8748f6970cb.tar.bz2 android_external_libavc-e027a11e31aaae2652a9d5a69a15f8748f6970cb.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)) { |