[vlc-commits] packetizer: h264: fix divbyzero
Francois Cartegnie
git at videolan.org
Wed Jul 19 10:30:58 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul 19 10:29:22 2017 +0200| [7eea089393d6fc1de3436b4d486a466d14566a04] | committer: Francois Cartegnie
packetizer: h264: fix divbyzero
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7eea089393d6fc1de3436b4d486a466d14566a04
---
modules/packetizer/h264.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index 1c1f51f387..342e27729c 100644
--- a/modules/packetizer/h264.c
+++ b/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 */
More information about the vlc-commits
mailing list