Fix in returning end of bitstream error for MBAFF

In case of MBAFF streams, slices should terminate on
even MB boundary. If bytes are exhausted with odd number
of MBs decoded for MBAff, then treat that as error.

Bug: 33933140

Change-Id: Ifc26b66ff8ebdb3aec5c0d6c512e4cac3f54c5b7
diff --git a/decoder/ih264d_parse_islice.c b/decoder/ih264d_parse_islice.c
index bbb6110..768bc74 100644
--- a/decoder/ih264d_parse_islice.c
+++ b/decoder/ih264d_parse_islice.c
@@ -870,6 +870,10 @@
         if(u1_mbaff)
         {
             ih264d_update_mbaff_left_nnz(ps_dec, ps_cur_mb_info);
+            if(!uc_more_data_flag && (0 == (i2_cur_mb_addr & 1)))
+            {
+                return ERROR_EOB_FLUSHBITS_T;
+            }
         }
         /**************************************************************/
         /* Get next Macroblock address                                */
diff --git a/decoder/ih264d_parse_pslice.c b/decoder/ih264d_parse_pslice.c
index a33a03f..bd7eacb 100644
--- a/decoder/ih264d_parse_pslice.c
+++ b/decoder/ih264d_parse_pslice.c
@@ -1350,6 +1350,10 @@
         if(u1_mbaff)
         {
             ih264d_update_mbaff_left_nnz(ps_dec, ps_cur_mb_info);
+            if(!uc_more_data_flag && !i2_mb_skip_run && (0 == (i2_cur_mb_addr & 1)))
+            {
+                return ERROR_EOB_FLUSHBITS_T;
+            }
         }
         /**************************************************************/
         /* Get next Macroblock address                                */