summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin F. Haggerty <haggertk@lineageos.org>2020-03-03 03:45:26 (GMT)
committerKevin F. Haggerty <haggertk@lineageos.org>2020-03-03 03:45:26 (GMT)
commit31c89a79a90209b72a7fa1d5ae89b80abab7d9ab (patch)
tree19d4d9c6c83fb0a122d7db1d8acd7eea30747645
parente04acc02e9d7280ea2edc774ac71fb0e5a0260ae (diff)
parentddeb73eb1fbca3ff23501797426625180db977b8 (diff)
downloadandroid_external_libavc-lineage-15.1.zip
android_external_libavc-lineage-15.1.tar.gz
android_external_libavc-lineage-15.1.tar.bz2
Merge tag 'android-8.1.0_r74' into staging/lineage-15.1_merge-android-8.1.0_r74lineage-15.1
Android 8.1.0 release 74 * tag 'android-8.1.0_r74': decoder: Fix minimum poc calculation check while adding to display Change-Id: Ic6cc11c6b8f69b6eb4aef63c47d639162636f085
-rw-r--r--decoder/ih264d_utils.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/decoder/ih264d_utils.c b/decoder/ih264d_utils.c
index edfb8f1..6c4ded0 100644
--- a/decoder/ih264d_utils.c
+++ b/decoder/ih264d_utils.c
@@ -1205,7 +1205,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];
@@ -1268,8 +1270,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);
@@ -1280,7 +1282,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];