summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg_filter.c
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2019-02-20 20:54:11 +0200
committerJan Ekström <jeebjp@gmail.com>2019-02-21 20:13:21 +0200
commit8cf757ee8d806c581ce453546c4e98cf746a442e (patch)
treecc5b76cfbc0e26721c010e0b87cf4a553f89ad77 /fftools/ffmpeg_filter.c
parent7e4d3dbe18cec6f4ce0e9dfeb570d47af70af12c (diff)
ffmpeg_filter: initialize sub2video.end_pts together with last_pts
This way re-initializations properly update end_pts, enabling sub2video_heartbeat to call sub2video_update as expected to re-init the sub2video AVFrame's contents and to feed a frame into the filter chain. This then fixes memory usage ballooning due to framesync waiting for secondary input in case of no actual subtitle samples being present for a while in source after a re-init occurs.
Diffstat (limited to 'fftools/ffmpeg_filter.c')
-rw-r--r--fftools/ffmpeg_filter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 8c0ff99dd9..72838de1e2 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -739,6 +739,7 @@ static int sub2video_prepare(InputStream *ist, InputFilter *ifilter)
if (!ist->sub2video.frame)
return AVERROR(ENOMEM);
ist->sub2video.last_pts = INT64_MIN;
+ ist->sub2video.end_pts = INT64_MIN;
return 0;
}