[vlc-commits] demux: h26x: fix div by zero (fix #17634)
    Francois Cartegnie 
    git at videolan.org
       
    Sun Nov 13 19:32:16 CET 2016
    
    
  
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Nov 13 19:30:55 2016 +0100| [3cb2a4974cc7fd2ad28c27c82aa3ba911d1243bd] | committer: Francois Cartegnie
demux: h26x: fix div by zero (fix #17634)
not intuitive, but something was divided by numerator
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3cb2a4974cc7fd2ad28c27c82aa3ba911d1243bd
---
 modules/demux/mpeg/h26x.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mpeg/h26x.c b/modules/demux/mpeg/h26x.c
index 002650c..7ea5bb2 100644
--- a/modules/demux/mpeg/h26x.c
+++ b/modules/demux/mpeg/h26x.c
@@ -443,7 +443,8 @@ static int Demux( demux_t *p_demux)
                 if( !p_sys->frame_rate_den )
                 {
                     /* Use packetizer's one */
-                    if( p_sys->p_packetizer->fmt_out.video.i_frame_rate_base )
+                    if( p_sys->p_packetizer->fmt_out.video.i_frame_rate_base &&
+                        p_sys->p_packetizer->fmt_out.video.i_frame_rate )
                     {
                         p_sys->frame_rate_num = p_sys->p_packetizer->fmt_out.video.i_frame_rate;
                         p_sys->frame_rate_den = p_sys->p_packetizer->fmt_out.video.i_frame_rate_base;
    
    
More information about the vlc-commits
mailing list