diff options
author | Hamsalekha S <hamsalekha.s@ittiam.com> | 2017-02-10 14:44:43 +0530 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-05-24 17:21:44 +0000 |
commit | 9490be39f05fa06246fb9285dffd6391345c3dbd (patch) | |
tree | 16374404c293bf331f08bf97cf55cc83217d27ff /decoder/ih264d_parse_islice.c | |
parent | 77af8273824d8783ceb9eaf045bd1c587845c432 (diff) | |
download | android_external_libavc-9490be39f05fa06246fb9285dffd6391345c3dbd.tar.gz android_external_libavc-9490be39f05fa06246fb9285dffd6391345c3dbd.tar.bz2 android_external_libavc-9490be39f05fa06246fb9285dffd6391345c3dbd.zip |
Decoder: Fix end of bitstream error.
The end of bistream error check was fixed for
odd number of macroblocks in Mbaff frames.
Bug: 37008096
Test: Ittiam-verified
Change-Id: I058d74a3c1d1511968c2b36802dfc5c102947919
(cherry picked from commit 2e01924cd692191c970c64ec3f358e53dccb9e54)
Diffstat (limited to 'decoder/ih264d_parse_islice.c')
-rw-r--r-- | decoder/ih264d_parse_islice.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/decoder/ih264d_parse_islice.c b/decoder/ih264d_parse_islice.c index 0312060..504b775 100644 --- a/decoder/ih264d_parse_islice.c +++ b/decoder/ih264d_parse_islice.c @@ -866,6 +866,8 @@ WORD32 ih264d_parse_islice_data_cavlc(dec_struct_t * ps_dec, ps_cur_deblk_mb->u1_mb_qp = ps_dec->u1_qp; } + uc_more_data_flag = MORE_RBSP_DATA(ps_bitstrm); + if(u1_mbaff) { ih264d_update_mbaff_left_nnz(ps_dec, ps_cur_mb_info); @@ -879,7 +881,7 @@ WORD32 ih264d_parse_islice_data_cavlc(dec_struct_t * ps_dec, /**************************************************************/ i2_cur_mb_addr++; - uc_more_data_flag = MORE_RBSP_DATA(ps_bitstrm); + /* Store the colocated information */ { @@ -1087,8 +1089,7 @@ WORD32 ih264d_parse_islice_data_cabac(dec_struct_t * ps_dec, { ih264d_update_mbaff_left_nnz(ps_dec, ps_cur_mb_info); } - /* Next macroblock information */ - i2_cur_mb_addr++; + if(ps_cur_mb_info->u1_topmb && u1_mbaff) uc_more_data_flag = 1; @@ -1099,6 +1100,16 @@ WORD32 ih264d_parse_islice_data_cabac(dec_struct_t * ps_dec, uc_more_data_flag = !uc_more_data_flag; COPYTHECONTEXT("Decode Sliceterm",!uc_more_data_flag); } + + if(u1_mbaff) + { + if(!uc_more_data_flag && (0 == (i2_cur_mb_addr & 1))) + { + return ERROR_EOB_FLUSHBITS_T; + } + } + /* Next macroblock information */ + i2_cur_mb_addr++; /* Store the colocated information */ { |