Call ih264d_deblock_display only for valid process calls
ih264d_deblock_display() should be called only if current
decoder call has got a picture buffer during start of pic
Bug: 33751193
Change-Id: I3bf2fdbb910bf7240484dae48b85d72833830d56
(cherry picked from commit 318368435f38629288dc500081a018dc698ca1f1)
diff --git a/decoder/ih264d_api.c b/decoder/ih264d_api.c
index 09c0d5e..4a81465 100644
--- a/decoder/ih264d_api.c
+++ b/decoder/ih264d_api.c
@@ -2318,7 +2318,8 @@
/* if new frame in not found (if we are still getting slices from previous frame)
* ih264d_deblock_display is not called. Such frames will not be added to reference /display
*/
- if((ps_dec->ps_dec_err_status->u1_err_flag & REJECT_CUR_PIC) == 0)
+ if (((ps_dec->ps_dec_err_status->u1_err_flag & REJECT_CUR_PIC) == 0)
+ && (ps_dec->u4_pic_buf_got == 1))
{
/* Calling Function to deblock Picture and Display */
ret = ih264d_deblock_display(ps_dec);