[vlc-devel] [PATCH] video_filter/fps: Prevent division by 0
Steve Lhomme
robux4 at ycbcr.xyz
Fri Dec 13 10:02:09 CET 2019
LGTM
On 2019-12-11 18:51, Marvin Scholz wrote:
> ---
> Could not test this change, as video filters are currently
> somehow broken on macOS so there was no way to make VLC use
> that filter...
> ---
> 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 );
> --
> 2.20.1 (Apple Git-117)
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list