Fix resolution change within a decode call.

If resolution changes within a decode call,due to multiple
sps, the decoder hangs as the the application will
give the same data again in the next decode call. This
results in a hang. Fixed this by flaging an error,
when sps/resoultion changes within a process call.

Bug: 38487564
Test: ran POC on patched O-based system w/o hanging
Change-Id: I30095b2e8bf573c1a58a316a23b1a5e6a4af589b
diff --git a/decoder/ih264d_parse_headers.c b/decoder/ih264d_parse_headers.c
index c979ade..ec57874 100644
--- a/decoder/ih264d_parse_headers.c
+++ b/decoder/ih264d_parse_headers.c
@@ -1221,6 +1221,16 @@
                     /* ! */
                     ih264d_rbsp_to_sodb(ps_dec->ps_bitstrm);
                     i_status = ih264d_parse_sps(ps_dec, ps_bitstrm);
+                    ps_dec->u4_sps_cnt_in_process++;
+                    /*If a resolution change happens within a process call, due to multiple sps
+                     * we will not support it.
+                     */
+                    if((ps_dec->u4_sps_cnt_in_process > 1 ) &&
+                                    (i_status == IVD_RES_CHANGED))
+                    {
+                        i_status = ERROR_INV_SPS_PPS_T;
+                        ps_dec->u1_res_changed = 0;
+                    }
                     if(i_status == ERROR_INV_SPS_PPS_T)
                         return i_status;
                     if(!i_status)