[FFmpeg-devel] [EXTREMELY IMPORTANT] [PLEASE DO NOT IGNORE] [PATCH] avfilter/framesync: do not pick AV_TIME_BASE for time base when not needed.
Paul B Mahol
onemda at gmail.com
Sat Feb 1 22:05:49 EET 2020
Fixes picking time base when all input time bases are same and for example
20833/500000.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavfilter/framesync.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/framesync.c b/libavfilter/framesync.c
index bc95f7d904..94abb469e6 100644
--- a/libavfilter/framesync.c
+++ b/libavfilter/framesync.c
@@ -144,7 +144,7 @@ int ff_framesync_configure(FFFrameSync *fs)
if (fs->time_base.num) {
gcd = av_gcd(fs->time_base.den, fs->in[i].time_base.den);
lcm = (fs->time_base.den / gcd) * fs->in[i].time_base.den;
- if (lcm < AV_TIME_BASE / 2) {
+ if (lcm <= AV_TIME_BASE / 2) {
fs->time_base.den = lcm;
fs->time_base.num = av_gcd(fs->time_base.num,
fs->in[i].time_base.num);
--
2.17.1
More information about the ffmpeg-devel
mailing list