summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin F. Haggerty <haggertk@lineageos.org>2020-03-03 01:41:23 (GMT)
committerKevin F. Haggerty <haggertk@lineageos.org>2020-03-03 01:41:23 (GMT)
commit9e62fd3ef1b39cceb8b3dc2f98a964edab106cc2 (patch)
tree3fe7f6f2ceceaaae2721c1f65aa6c082a887fc58
parent9a9e19f0a2247bf16ab5a4a0c626b1c0d75771ab (diff)
parent7f33b96e77cf2b17360507babd8cb8d02c635eee (diff)
downloadandroid_external_libavc-lineage-16.0.zip
android_external_libavc-lineage-16.0.tar.gz
android_external_libavc-lineage-16.0.tar.bz2
Merge tag 'android-9.0.0_r54' into staging/lineage-16.0_merge-android-9.0.0_r54lineage-16.0
Android 9.0.0 release 54 * tag 'android-9.0.0_r54': decoder: Fix minimum poc calculation check while adding to display Change-Id: Ie83b2e53a8d8bb01f2553761a57ca03ea7ac5ee9
-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];