1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00
FFmpeg/libavfilter
Marton Balint 52cc89dc45 avfilter/yadif_common: fix timestamps with very small timebases
Yadif filter assumed that the output timebase is always half of the input
timebase. This is not true if halving the input time base is not representable
as an AVRational causing the output timestamps to be invalidly scaled in such a
case.

So let's use av_reduce instead of av_mul_q when calculating the output time
base and if the conversion is inexact then let's fall back to the original
timebase which probably makes more parctical sense than using x/INT_MAX.

Fixes invalidly scaled pts_time values in this command line:
ffmpeg -f lavfi -i testsrc -vf settb=tb=1/2000000000,yadif,showinfo -f null none

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-02-04 20:04:18 +01:00
..
2023-11-18 19:55:42 +01:00
2023-11-18 19:55:42 +01:00
2023-11-16 20:53:18 +02:00
2023-09-28 00:17:47 +02:00
2023-11-16 20:53:18 +02:00
2023-11-18 19:55:42 +01:00
2023-11-22 19:28:40 +01:00
2024-01-05 09:29:05 +01:00
2023-11-30 11:08:34 +01:00
2024-01-05 09:29:05 +01:00
2024-01-01 20:12:52 +01:00
2024-01-01 20:12:52 +01:00
2024-01-05 09:29:05 +01:00
2023-11-18 19:55:42 +01:00
2024-01-07 13:59:02 +01:00
2024-01-01 20:12:52 +01:00