Permalink
Browse files

packetizer: h264: fix divbyzero

  • Loading branch information...
fcartegnie committed Jul 19, 2017
1 parent 7f5bf53 commit 7eea089393d6fc1de3436b4d486a466d14566a04
Showing with 2 additions and 1 deletion.
  1. +2 −1 modules/packetizer/h264.c
@@ -209,7 +209,8 @@ static void ActivateSets( decoder_t *p_dec, const h264_sequence_parameter_set_t

if( p_sps->vui.b_valid )
{
if( !p_dec->fmt_in.video.i_frame_rate_base && p_sps->vui.i_num_units_in_tick > 0 )
if( !p_dec->fmt_in.video.i_frame_rate_base &&
p_sps->vui.i_num_units_in_tick > 0 && p_sps->vui.i_time_scale > 1 )
{
const unsigned i_rate_base = p_sps->vui.i_num_units_in_tick;
const unsigned i_rate = p_sps->vui.i_time_scale >> 1; /* num_clock_ts == 2 */

0 comments on commit 7eea089

Please sign in to comment.