lavc/hevc_ps: Refine sps_range_extension parse.
authorJun Zhao <mypopydev@gmail.com>
Sat, 7 Jul 2018 04:54:15 +0000 (12:54 +0800)
committerJun Zhao <jun.zhao@intel.com>
Fri, 13 Jul 2018 12:15:15 +0000 (20:15 +0800)
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
libavcodec/hevc_ps.c

index bca3abb..bc5406b 100644 (file)
@@ -1094,11 +1094,9 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
         decode_vui(gb, avctx, apply_defdispwin, sps);
 
     if (get_bits1(gb)) { // sps_extension_flag
-        int sps_extension_flag[1];
-        for (i = 0; i < 1; i++)
-            sps_extension_flag[i] = get_bits1(gb);
+        int sps_range_extension_flag = get_bits1(gb);
         skip_bits(gb, 7); //sps_extension_7bits = get_bits(gb, 7);
-        if (sps_extension_flag[0]) {
+        if (sps_range_extension_flag) {
             int extended_precision_processing_flag;
             int cabac_bypass_alignment_enabled_flag;