[vlc-commits] packetizer: h264: fix divbyzero

Francois Cartegnie git at videolan.org
Tue Apr 7 22:20:05 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Apr  7 22:17:39 2015 +0200| [53a9fa09fa5bfe207e13c3fd3d45648a50b69415] | committer: Francois Cartegnie

packetizer: h264: fix divbyzero

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=53a9fa09fa5bfe207e13c3fd3d45648a50b69415
---

 modules/packetizer/h264.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index 56e1e60..4cb28d1 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -798,7 +798,7 @@ static block_t *OutputPicture( decoder_t *p_dec )
         p_sys->i_frame_dts = VLC_TS_INVALID;
         p_sys->i_frame_pts = VLC_TS_INVALID;
     }
-    else if( p_sys->b_timing_info_present_flag )
+    else if( p_sys->b_timing_info_present_flag && p_sys->i_time_scale )
     {
         p_sys->i_frame_pts += CLOCK_FREQ * p_sys->i_num_units_in_tick / p_sys->i_time_scale;
     }



More information about the vlc-commits mailing list