hevc: Use get_bits_long() in decode_vui()
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 15 Feb 2014 21:29:17 +0000 (22:29 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Sun, 9 Mar 2014 07:25:39 +0000 (08:25 +0100)
Fix assertion failure.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
libavcodec/hevc_ps.c

index c3aabe7..c4c7ee2 100644 (file)
@@ -499,8 +499,8 @@ static void decode_vui(HEVCContext *s, HEVCSPS *sps)
 
     vui->vui_timing_info_present_flag = get_bits1(gb);
     if (vui->vui_timing_info_present_flag) {
-        vui->vui_num_units_in_tick               = get_bits(gb, 32);
-        vui->vui_time_scale                      = get_bits(gb, 32);
+        vui->vui_num_units_in_tick               = get_bits_long(gb, 32);
+        vui->vui_time_scale                      = get_bits_long(gb, 32);
         vui->vui_poc_proportional_to_timing_flag = get_bits1(gb);
         if (vui->vui_poc_proportional_to_timing_flag)
             vui->vui_num_ticks_poc_diff_one_minus1 = get_ue_golomb_long(gb);