---
 libavutil/parseutils.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c
index 94e88e0a79..9f57b16ec2 100644
--- a/libavutil/parseutils.c
+++ b/libavutil/parseutils.c
@@ -193,6 +193,9 @@ int av_parse_video_rate(AVRational *rate, const char *arg)
     /* Then, we try to parse it as fraction */
     if ((ret = av_parse_ratio_quiet(rate, arg, 1001000)) < 0)
         return ret;
+    if (!rate->num || !rate->den)
+        if ((ret = av_parse_ratio_quiet(rate, arg, INT_MAX)) < 0)
+            return ret;
     if (rate->num <= 0 || rate->den <= 0)
         return AVERROR(EINVAL);
     return 0;
-- 
2.43.0

_______________________________________________
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