[automerger] Bug fix for flush without valid frames am: 10c1176f1b am: 54fe392964 am: 6261ed297b am: 051d4fb2dc am: 1863b7cc03 am: e6d4971fdb am: 309f184ed5
Change-Id: I1a46096968e5ba105ab3c8d8adf8891b097575bb
diff --git a/decoder/ih264d_api.c b/decoder/ih264d_api.c
index 3ace427..094ca8e 100644
--- a/decoder/ih264d_api.c
+++ b/decoder/ih264d_api.c
@@ -1979,8 +1979,16 @@
}
- if(ps_dec->u1_flushfrm && ps_dec->u1_init_dec_flag)
+ if(ps_dec->u1_flushfrm)
{
+ if(ps_dec->u1_init_dec_flag == 0)
+ {
+ /*Come out of flush mode and return*/
+ ps_dec->u1_flushfrm = 0;
+ return (IV_FAIL);
+ }
+
+
ih264d_get_next_display_field(ps_dec, ps_dec->ps_out_buffer,
&(ps_dec->s_disp_op));