]> git.sesse.net Git - ffmpeg/commitdiff
ffmpeg_filter: initialize sub2video.end_pts together with last_pts
authorJan Ekström <jeebjp@gmail.com>
Wed, 20 Feb 2019 18:54:11 +0000 (20:54 +0200)
committerJan Ekström <jeebjp@gmail.com>
Thu, 21 Feb 2019 18:13:21 +0000 (20:13 +0200)
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.

fftools/ffmpeg_filter.c

index 8c0ff99dd98ddaec89ca5d906bd4eefbd914cca0..72838de1e2c57f85249f7e762e1bfd4a2dae2988 100644 (file)
@@ -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;
 }