diff options
author | Hamsalekha S <hamsalekha.s@ittiam.com> | 2017-05-08 17:03:06 +0530 |
---|---|---|
committer | MSe <mse1969@posteo.de> | 2017-07-07 21:05:39 +0200 |
commit | a4e451b46a6077b842e05aec8d2d83cbb7f50e04 (patch) | |
tree | 3bdea742bc8f69a65e74ea790a66ea3494632a0f | |
parent | 5b96c82ab152fa023a11de8e58b86e1c3da6d796 (diff) | |
download | android_external_libavc-a4e451b46a6077b842e05aec8d2d83cbb7f50e04.tar.gz android_external_libavc-a4e451b46a6077b842e05aec8d2d83cbb7f50e04.tar.bz2 android_external_libavc-a4e451b46a6077b842e05aec8d2d83cbb7f50e04.zip |
Decoder: Fixed flag u1_top_bottom_decoded.
Fixed initialization of flag u1_top_bottom_decoded
in decoder context. This flag indicates if top
field and botton field is decoded.
Bug: 36993291
Test: avcdec --input poc.h264 --output /dev/null
AOSP-Change-Id: I9f8a2620683abd8b15e4780d76d4849394710716
(cherry picked from commit 7703822731a3e5425390ba1d177d061a699c367d)
CVE-2017-0693
Change-Id: Ibd2f703e0aef8faa4cb32e036db1a74815ea7b7c
-rw-r--r-- | decoder/ih264d_api.c | 4 | ||||
-rw-r--r-- | decoder/ih264d_parse_slice.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/decoder/ih264d_api.c b/decoder/ih264d_api.c index 3432039..fec7e62 100644 --- a/decoder/ih264d_api.c +++ b/decoder/ih264d_api.c @@ -2275,6 +2275,10 @@ WORD32 ih264d_video_decode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op) ps_dec->u1_top_bottom_decoded |= TOP_FIELD_ONLY; } } + else + { + ps_dec->u1_top_bottom_decoded = TOP_FIELD_ONLY | BOT_FIELD_ONLY; + } /* 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 diff --git a/decoder/ih264d_parse_slice.c b/decoder/ih264d_parse_slice.c index f755970..7e0815f 100644 --- a/decoder/ih264d_parse_slice.c +++ b/decoder/ih264d_parse_slice.c @@ -1191,10 +1191,6 @@ WORD32 ih264d_parse_decode_slice(UWORD8 u1_is_idr_slice, u1_nal_unit_type = SLICE_NAL; if(u1_is_idr_slice) { - if(0 == u1_field_pic_flag) - { - ps_dec->u1_top_bottom_decoded = TOP_FIELD_ONLY | BOT_FIELD_ONLY; - } u1_nal_unit_type = IDR_SLICE_NAL; u4_idr_pic_id = ih264d_uev(pu4_bitstrm_ofst, pu4_bitstrm_buf); |