aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHamsalekha S <hamsalekha.s@ittiam.com>2017-08-01 14:51:55 +0530
committerJP Sugarbroad <jpsugar@google.com>2017-10-19 13:02:26 -0700
commitc68ba5cbec089bfd37ea3b01f40a559a6f5969df (patch)
tree1b98748dc58dd8fa08b725a3f338913e3ceff73d
parentf06beb10d0183e07b57d9b18c016e15c918ce6b7 (diff)
downloadlibavc-c68ba5cbec089bfd37ea3b01f40a559a6f5969df.tar.gz
Decoder: Fixed hang in the case of dangling field
The u1_top_bottom_decoded flag in the decoder context has been fixed to be updated correctly in the case of dangling field Bug: 63315932 Test: ran POC after patching Change-Id: I8db4ebeb94fba735ba45f365c37e52a202ea84cd (cherry picked from commit 252628cffba8702e36b98c193bcd2fe67d8237ee)
-rw-r--r--decoder/ih264d_parse_slice.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/decoder/ih264d_parse_slice.c b/decoder/ih264d_parse_slice.c
index bdfccb6..2d8a9af 100644
--- a/decoder/ih264d_parse_slice.c
+++ b/decoder/ih264d_parse_slice.c
@@ -1382,9 +1382,8 @@ WORD32 ih264d_parse_decode_slice(UWORD8 u1_is_idr_slice,
if(ps_dec->u1_dangling_field == 1)
{
ps_dec->u1_second_field = 1 - ps_dec->u1_second_field;
- ps_cur_slice->u1_bottom_field_flag = u1_bottom_field_flag;
- ps_dec->u2_prv_frame_num = u2_frame_num;
ps_dec->u1_first_slice_in_stream = 0;
+ ps_dec->u1_top_bottom_decoded = TOP_FIELD_ONLY | BOT_FIELD_ONLY;
return ERROR_DANGLING_FIELD_IN_PIC;
}