diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-04-26 00:09:50 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-05-02 10:59:24 +0200 |
commit | ae95cd85dc73319a704f1092b7542978ef8869dd (patch) | |
tree | 7a64c49bc8901faf62c88cd8861eae4e6a4ec859 /fftools | |
parent | ef69f6a9d24e5508294f4009b1011289c683284e (diff) | |
download | ffmpeg-ae95cd85dc73319a704f1092b7542978ef8869dd.tar.gz |
fftools/ffmpeg_filter: stop using InputStream.pts for filter EOF ts
Use InputStream.last_frame_pts/duration instead, which is more accurate.
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffmpeg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index e9b083b05a..3a0d1b4559 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1382,7 +1382,9 @@ static int send_filter_eof(InputStream *ist) int i, ret; for (i = 0; i < ist->nb_filters; i++) { - ret = ifilter_send_eof(ist->filters[i], ist->pts, AV_TIME_BASE_Q); + int64_t end_pts = ist->last_frame_pts == AV_NOPTS_VALUE ? AV_NOPTS_VALUE : + ist->last_frame_pts + ist->last_frame_duration_est; + ret = ifilter_send_eof(ist->filters[i], end_pts, ist->last_frame_tb); if (ret < 0) return ret; } |