[vlc-commits] video_filter/fps: Prevent division by 0
Marvin Scholz
git at videolan.org
Fri Dec 13 13:28:09 CET 2019
vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Wed Dec 11 18:23:02 2019 +0100| [e037f2129ec6432db6a13a6632bd36290e920ac9] | committer: Marvin Scholz
video_filter/fps: Prevent division by 0
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e037f2129ec6432db6a13a6632bd36290e920ac9
---
modules/video_filter/fps.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/video_filter/fps.c b/modules/video_filter/fps.c
index 9aea2dd468..99e13bc009 100644
--- a/modules/video_filter/fps.c
+++ b/modules/video_filter/fps.c
@@ -160,6 +160,12 @@ static int Open( vlc_object_t *p_this)
p_filter->fmt_out.video.i_frame_rate_base = i_out_frame_rate_base;
}
+ if( p_filter->fmt_out.video.i_frame_rate == 0 ) {
+ msg_Err( p_filter, "Invalid output frame rate" );
+ free( p_sys );
+ return VLC_EGENERIC;
+ }
+
msg_Dbg( p_filter, "Converting fps from %d/%d -> %d/%d",
p_filter->fmt_in.video.i_frame_rate, p_filter->fmt_in.video.i_frame_rate_base,
p_filter->fmt_out.video.i_frame_rate, p_filter->fmt_out.video.i_frame_rate_base );
More information about the vlc-commits
mailing list