[FFmpeg-devel] [PATCH] ffmpeg_filter: switch sub2video.end_pts initialization value to 0

Jan Ekström jeebjp at gmail.com
Fri Feb 22 21:56:35 EET 2019


This seems to fix use cases where the sub2video output is the only
input to a filter chain.

Additionally, this is the value to which the structure's values
would implicitly get initialized to. The ballooning buffering case
would not get hit by this as the value of end_pts after
(re-)initialization would be less than INT64_MAX, thus hitting the
sub2video AVFrame initialization logic via sub2video_update in
sub2video_heartbeat.
---
 fftools/ffmpeg_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 72838de1e2..536f9c9c46 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -739,7 +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;
+    ist->sub2video.end_pts  = 0;
     return 0;
 }
 
-- 
2.20.1



More information about the ffmpeg-devel mailing list