On Thu, Mar 26, 2020 at 07:04:24AM +0800, lance.lmw...@gmail.com wrote:
> From: Limin Wang <lance.lmw...@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmw...@gmail.com>
> ---
>  libavfilter/af_adelay.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavfilter/af_adelay.c b/libavfilter/af_adelay.c
> index c9647771f2..7f498ba190 100644
> --- a/libavfilter/af_adelay.c
> +++ b/libavfilter/af_adelay.c
> @@ -155,7 +155,8 @@ static int config_input(AVFilterLink *inlink)
>          ret = av_sscanf(arg, "%d%c", &d->delay, &type);
>          if (ret != 2 || type != 'S') {
>              div = type == 's' ? 1.0 : 1000.0;
> -            av_sscanf(arg, "%f", &delay);
> +            if (av_sscanf(arg, "%f", &delay) != 1)
> +                return AVERROR(EINVAL);

If this case occurs is it clear to the user what is the problem ?
Maybe an error message should be added here

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to