Paul B Mahol (12020-02-01): > Fixes picking time base when all input time bases are same and for example > 20833/500000. > > Signed-off-by: Paul B Mahol <one...@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);
Picking AV_TIME_BASE for a decimal approximation of 1/24 seems like the right thing to do. Also, since this change only affects the case with equality, there is no loss of precision. I'll keep the code as is, unless there's a better reason. Regards, -- Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ 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".