Fix in reading short_term_ref_pic_set_idx in slice header

This is to be set to 0, when num_short_term_ref_pic_sets in sps is 1.

Change-Id: Ied061106952eddadd1c92281c6183fd510e2b0b0
diff --git a/decoder/ihevcd_parse_slice_header.c b/decoder/ihevcd_parse_slice_header.c
index 2afa4d2..e9c3073 100644
--- a/decoder/ihevcd_parse_slice_header.c
+++ b/decoder/ihevcd_parse_slice_header.c
@@ -419,10 +419,13 @@
             {
                 WORD32 numbits;
 
-                numbits = 32 - CLZ(ps_sps->i1_num_short_term_ref_pic_sets - 1);
-                BITS_PARSE("short_term_ref_pic_set_idx", value, ps_bitstrm, numbits);
-                ps_slice_hdr->i1_short_term_ref_pic_set_idx = value;
-                ps_slice_hdr->i1_short_term_ref_pic_set_idx = CLIP3(ps_slice_hdr->i1_short_term_ref_pic_set_idx, 0, MAX_STREF_PICS_SPS - 1);
+                ps_slice_hdr->i1_short_term_ref_pic_set_idx = 0;
+                if(ps_sps->i1_num_short_term_ref_pic_sets > 1)
+                {
+                    numbits = 32 - CLZ(ps_sps->i1_num_short_term_ref_pic_sets - 1);
+                    BITS_PARSE("short_term_ref_pic_set_idx", value, ps_bitstrm, numbits);
+                    ps_slice_hdr->i1_short_term_ref_pic_set_idx = value;
+                }
 
                 st_rps_idx = ps_slice_hdr->i1_short_term_ref_pic_set_idx;
                 num_neg_pics = ps_sps->as_stref_picset[st_rps_idx].i1_num_neg_pics;