diff options
author | Hamsalekha S <hamsalekha.s@ittiam.com> | 2017-02-10 14:47:11 +0530 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-15 18:56:13 +0000 |
commit | 798232ae4e39d8815c5475c29941d1ed1803bada (patch) | |
tree | 3f15ac1a5d77eee168769f85062837207a10faed | |
parent | 3ebe3b9a25e03a5e5580793d735252d187df18d6 (diff) | |
download | android_external_libavc-798232ae4e39d8815c5475c29941d1ed1803bada.tar.gz android_external_libavc-798232ae4e39d8815c5475c29941d1ed1803bada.tar.bz2 android_external_libavc-798232ae4e39d8815c5475c29941d1ed1803bada.zip |
Decoder: Fix in the case of MMCO 6
Added an error check in the case of MMCO 6
(SET_LT_INDEX)
Bug: 38014992
Test: POC fails before / works after patch
Change-Id: I76e38a8e2ff0bab043b47f44f1f7b1d4fe60d416
(cherry picked from commit 9e4f0ce7042078aeffaa16f2773cc2d1b82cdb12)
(cherry picked from commit 41489f9ece970df8530e28d7a24710b1beb755e2)
-rw-r--r-- | decoder/ih264d_dpb_mgr.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/decoder/ih264d_dpb_mgr.c b/decoder/ih264d_dpb_mgr.c index e02cc90..0a61ffd 100644 --- a/decoder/ih264d_dpb_mgr.c +++ b/decoder/ih264d_dpb_mgr.c @@ -1289,11 +1289,22 @@ WORD32 ih264d_do_mmco_buffer(dpb_commands_t *ps_dpb_cmds, u4_cur_pic_num); if(ret != OK) return ret; - ret = ih264d_delete_st_node_or_make_lt(ps_dpb_mgr, - u4_cur_pic_num, u4_lt_idx, - u1_fld_pic_flag); - if(ret != OK) - return ret; + + if(ps_dpb_mgr->u1_num_st_ref_bufs > 0) + + { + ret = ih264d_delete_st_node_or_make_lt(ps_dpb_mgr, + u4_cur_pic_num, + u4_lt_idx, + u1_fld_pic_flag); + if(ret != OK) + return ret; + } + else + { + return ERROR_DBP_MANAGER_T; + } + u1_marked_lt = 1; break; } |