diff options
author | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-01-09 04:51:33 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-01-09 04:51:33 +0000 |
commit | 8c2ee3ea8bf5b8d520bdcb5a1952e87ddaa881c4 (patch) | |
tree | 94e0f6076b83b3dac0281387417c1761ff20333b | |
parent | 474797af3c7322a4b3bd8fe2ef440bae1deecbdf (diff) | |
parent | 4b7a562681faec3fab114feee78ad19789b198fb (diff) | |
download | libavc-8c2ee3ea8bf5b8d520bdcb5a1952e87ddaa881c4.tar.gz |
Merge "decoder: Fix minimum poc calculation check while adding to display" into oc-dev am: 9d7a036d7b am: cebf26ab4d am: f64194a96f am: ed2b83d989 am: 4b7a562681
Change-Id: I0966eed6f66382e3fa7ccc19558734cc202ed0f3
-rw-r--r-- | decoder/ih264d_utils.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/decoder/ih264d_utils.c b/decoder/ih264d_utils.c index 48a98f6..28d8db0 100644 --- a/decoder/ih264d_utils.c +++ b/decoder/ih264d_utils.c @@ -1238,7 +1238,9 @@ WORD32 ih264d_assign_display_seq(dec_struct_t *ps_dec) && (DO_NOT_DISP != ps_dpb_mgr->ai4_poc_buf_id_map[i][0])) { - if(i4_poc_buf_id_map[i][1] < i4_min_poc) + /* Checking for <= is necessary to handle cases where there is one + valid buffer with poc set to 0x7FFFFFFF. */ + if(i4_poc_buf_id_map[i][1] <= i4_min_poc) { i4_min_poc = i4_poc_buf_id_map[i][1]; i4_min_poc_buf_id = i4_poc_buf_id_map[i][0]; @@ -1302,8 +1304,8 @@ void ih264d_release_display_bufs(dec_struct_t *ps_dec) WORD32 (*i4_poc_buf_id_map)[3] = ps_dpb_mgr->ai4_poc_buf_id_map; i4_min_poc = 0x7fffffff; - i4_min_poc_buf_id = -1; - i4_min_index = -1; + i4_min_poc_buf_id = 0; + i4_min_index = 0; ih264d_delete_nonref_nondisplay_pics(ps_dpb_mgr); @@ -1314,7 +1316,9 @@ void ih264d_release_display_bufs(dec_struct_t *ps_dec) { if(i4_poc_buf_id_map[i][0] != -1) { - if(i4_poc_buf_id_map[i][1] < i4_min_poc) + /* Checking for <= is necessary to handle cases where there is one + valid buffer with poc set to 0x7FFFFFFF. */ + if(i4_poc_buf_id_map[i][1] <= i4_min_poc) { i4_min_poc = i4_poc_buf_id_map[i][1]; i4_min_poc_buf_id = i4_poc_buf_id_map[i][0]; |