fftools/ffmpeg_filter: stop using InputStream.pts for filter EOF ts

Use InputStream.last_frame_pts/duration instead, which is more accurate.
This commit is contained in:
Anton Khirnov 2023-04-26 00:09:50 +02:00
parent ef69f6a9d2
commit ae95cd85dc
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}