History

lavu/opt: forward av_opt_get_video_rate() to av_opt_get_q()

The two functions are exactly the same.

Anton Khirnov committed 2 years ago

Commit 4a5bb841 parent efe38281 file · +1 −12Browse files

Unified · Split

libavutil/opt.c+1−12
@@ -1277,18 +1277,7 @@ int av_opt_get_image_size(void *obj, const char *name, int search_flags, int *w_ · 1276 unmodified lines
12771277
12781278 int av_opt_get_video_rate(void *obj, const char *name, int search_flags, AVRational *out_val)
12791279 {
1280− int64_t intnum = 1;
1281− double num = 1;
1282− int ret, den = 1;
1283−
1284− if ((ret = get_number(obj, name, &num, &den, &intnum, search_flags)) < 0)
1285− return ret;
1286−
1287− if (num == 1.0 && (int)intnum == intnum)
1288− *out_val = (AVRational) { intnum, den };
1289− else
1290− *out_val = av_d2q(num * intnum / den, 1 << 24);
1291− return 0;
1280+ return av_opt_get_q(obj, name, search_flags, out_val);
12921281 }
12931282
12941283 static int get_format(void *obj, const char *name, int search_flags, int *out_fmt,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t