diff options
author | Harish Mahendrakar <harish.mahendrakar@ittiam.com> | 2016-09-17 17:00:37 +0530 |
---|---|---|
committer | gitbuildkicker <android-build@google.com> | 2016-09-27 15:55:53 -0700 |
commit | d9bcf017e554b84306da4002b0ac97c45afd9f63 (patch) | |
tree | 3b80151cf17d883a20cc84600f48a82b372141e7 /decoder/ih264d_parse_pslice.c | |
parent | 3d1492200e76765a239bdb721e7621b6a774b9d0 (diff) | |
download | android_external_libavc-d9bcf017e554b84306da4002b0ac97c45afd9f63.tar.gz android_external_libavc-d9bcf017e554b84306da4002b0ac97c45afd9f63.tar.bz2 android_external_libavc-d9bcf017e554b84306da4002b0ac97c45afd9f63.zip |
Decoder: Fixes for handling errors in multi-slice MB Aff streams
Initialize default reference buffer for erroneous interlaced clips
Pick slice_type from decode thread slice structure
Call start_of_pic only once
Bug: 30822755
Change-Id: I553c646446d99a626d62351aa1b385355191cdc3
(cherry picked from commit bc71ad2d43dc03b2a71e3423da5385ed3cb9799a)
Diffstat (limited to 'decoder/ih264d_parse_pslice.c')
-rw-r--r-- | decoder/ih264d_parse_pslice.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/decoder/ih264d_parse_pslice.c b/decoder/ih264d_parse_pslice.c index 8f9949f..f64ee0c 100644 --- a/decoder/ih264d_parse_pslice.c +++ b/decoder/ih264d_parse_pslice.c @@ -1508,6 +1508,8 @@ WORD32 ih264d_mark_err_slice_skip(dec_struct_t * ps_dec, return ERROR_INV_SPS_PPS_T; } + /* call ih264d_start_of_pic only if it was not called earlier*/ + if(ps_dec->u4_pic_buf_got == 0) { //initialize slice params required by ih264d_start_of_pic to valid values ps_dec->ps_cur_slice->u1_slice_type = P_SLICE; @@ -1578,7 +1580,8 @@ WORD32 ih264d_mark_err_slice_skip(dec_struct_t * ps_dec, && ps_parse_cur_slice == ps_dec->ps_parse_cur_slice) { // Slice data corrupted - u1_num_mbs = ps_dec->u4_num_mbs_cur_nmb; + // in the case of mbaff, conceal from the even mb. + u1_num_mbs = (ps_dec->u4_num_mbs_cur_nmb >> u1_mbaff ) << u1_mbaff; if(u1_num_mbs) { |