aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/opt.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-02-08 16:02:14 +0100
committerAnton Khirnov <anton@khirnov.net>2024-03-01 16:57:24 +0100
commit84ba46fa5ebcccbefa5971bea3272ad30eb1d324 (patch)
treefb92cc4ddd70748477b1665e288a0e938cc51f2f /libavutil/opt.c
parent9fabdd64b2cd9b75337afe4f1f2268935a25d063 (diff)
downloadffmpeg-84ba46fa5ebcccbefa5971bea3272ad30eb1d324.tar.gz
lavu/opt: drop an always-NULL argument to get_number()
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r--libavutil/opt.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 4ae017f9ec..74c191dafa 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -965,7 +965,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
return *out_val ? 0 : AVERROR(ENOMEM);
}
-static int get_number(void *obj, const char *name, const AVOption **o_out, double *num, int *den, int64_t *intnum,
+static int get_number(void *obj, const char *name, double *num, int *den, int64_t *intnum,
int search_flags)
{
void *dst, *target_obj;
@@ -975,8 +975,6 @@ static int get_number(void *obj, const char *name, const AVOption **o_out, doubl
dst = ((uint8_t *)target_obj) + o->offset;
- if (o_out) *o_out= o;
-
return read_number(o, dst, num, den, intnum);
error:
@@ -991,7 +989,7 @@ int av_opt_get_int(void *obj, const char *name, int search_flags, int64_t *out_v
double num = 1;
int ret, den = 1;
- if ((ret = get_number(obj, name, NULL, &num, &den, &intnum, search_flags)) < 0)
+ if ((ret = get_number(obj, name, &num, &den, &intnum, search_flags)) < 0)
return ret;
if (num == den)
*out_val = intnum;
@@ -1006,7 +1004,7 @@ int av_opt_get_double(void *obj, const char *name, int search_flags, double *out
double num = 1;
int ret, den = 1;
- if ((ret = get_number(obj, name, NULL, &num, &den, &intnum, search_flags)) < 0)
+ if ((ret = get_number(obj, name, &num, &den, &intnum, search_flags)) < 0)
return ret;
*out_val = num * intnum / den;
return 0;
@@ -1018,7 +1016,7 @@ int av_opt_get_q(void *obj, const char *name, int search_flags, AVRational *out_
double num = 1;
int ret, den = 1;
- if ((ret = get_number(obj, name, NULL, &num, &den, &intnum, search_flags)) < 0)
+ if ((ret = get_number(obj, name, &num, &den, &intnum, search_flags)) < 0)
return ret;
if (num == 1.0 && (int)intnum == intnum)
@@ -1052,7 +1050,7 @@ int av_opt_get_video_rate(void *obj, const char *name, int search_flags, AVRatio
double num = 1;
int ret, den = 1;
- if ((ret = get_number(obj, name, NULL, &num, &den, &intnum, search_flags)) < 0)
+ if ((ret = get_number(obj, name, &num, &den, &intnum, search_flags)) < 0)
return ret;
if (num == 1.0 && (int)intnum == intnum)