mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/af_ladspa: use av_sscanf()
This commit is contained in:
parent
2de165a92b
commit
f79750bc32
@ -548,8 +548,8 @@ static av_cold int init(AVFilterContext *ctx)
|
|||||||
break;
|
break;
|
||||||
p = NULL;
|
p = NULL;
|
||||||
|
|
||||||
if (sscanf(arg, "c%d=%f", &i, &val) != 2) {
|
if (av_sscanf(arg, "c%d=%f", &i, &val) != 2) {
|
||||||
if (sscanf(arg, "%f", &val) != 1) {
|
if (av_sscanf(arg, "%f", &val) != 1) {
|
||||||
av_log(ctx, AV_LOG_ERROR, "Invalid syntax.\n");
|
av_log(ctx, AV_LOG_ERROR, "Invalid syntax.\n");
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
@ -715,7 +715,7 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar
|
|||||||
LADSPA_Data value;
|
LADSPA_Data value;
|
||||||
unsigned long port;
|
unsigned long port;
|
||||||
|
|
||||||
if (sscanf(cmd, "c%ld", &port) + sscanf(args, "%f", &value) != 2)
|
if (av_sscanf(cmd, "c%ld", &port) + av_sscanf(args, "%f", &value) != 2)
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
|
||||||
return set_control(ctx, port, value);
|
return set_control(ctx, port, value);
|
||||||
|
Loading…
Reference in New Issue
Block a user