ffmpeg | branch: master | Anton Khirnov <an...@khirnov.net> | Sat Aug 17 
16:29:30 2024 +0200| [4a5bb84515bab769b7702277abc7d07ea4c4d855] | committer: 
Anton Khirnov

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

The two functions are exactly the same.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a5bb84515bab769b7702277abc7d07ea4c4d855
---

 libavutil/opt.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 32a9e059e3..2cfc2d9c5a 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1277,18 +1277,7 @@ int av_opt_get_image_size(void *obj, const char *name, 
int search_flags, int *w_
 
 int av_opt_get_video_rate(void *obj, const char *name, int search_flags, 
AVRational *out_val)
 {
-    int64_t intnum = 1;
-    double     num = 1;
-    int   ret, den = 1;
-
-    if ((ret = get_number(obj, name, &num, &den, &intnum, search_flags)) < 0)
-        return ret;
-
-    if (num == 1.0 && (int)intnum == intnum)
-        *out_val = (AVRational) { intnum, den };
-    else
-        *out_val = av_d2q(num * intnum / den, 1 << 24);
-    return 0;
+    return av_opt_get_q(obj, name, search_flags, out_val);
 }
 
 static int get_format(void *obj, const char *name, int search_flags, int 
*out_fmt,

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

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

Reply via email to