File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2654,7 +2654,8 @@ static bool Ogg_ReadDaalaHeader( logical_stream_t *p_stream,
2654
2654
oggpack_buffer opb ;
2655
2655
uint32_t i_timebase_numerator ;
2656
2656
uint32_t i_timebase_denominator ;
2657
- int i_keyframe_frequency_force ;
2657
+ int keyframe_granule_shift ;
2658
+ unsigned int i_keyframe_frequency_force ;
2658
2659
uint8_t i_major ;
2659
2660
uint8_t i_minor ;
2660
2661
uint8_t i_subminor ;
@@ -2688,7 +2689,9 @@ static bool Ogg_ReadDaalaHeader( logical_stream_t *p_stream,
2688
2689
2689
2690
oggpack_adv ( & opb , 32 ); /* frame duration */
2690
2691
2691
- i_keyframe_frequency_force = 1 << oggpack_read ( & opb , 8 );
2692
+ keyframe_granule_shift = oggpack_read ( & opb , 8 );
2693
+ keyframe_granule_shift = __MIN (keyframe_granule_shift , 31 );
2694
+ i_keyframe_frequency_force = 1u << keyframe_granule_shift ;
2692
2695
2693
2696
/* granule_shift = i_log( frequency_force -1 ) */
2694
2697
p_stream -> i_granule_shift = 0 ;
You can’t perform that action at this time.
0 commit comments