summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fftools/ffmpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 4724f62fff..d3bc382dec 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -285,7 +285,8 @@ static void sub2video_heartbeat(InputStream *ist, int64_t pts)
/* do not send the heartbeat frame if the subtitle is already ahead */
if (pts2 <= ist2->sub2video.last_pts)
continue;
- if (pts2 >= ist2->sub2video.end_pts || !ist2->sub2video.frame->data[0])
+ if (pts2 >= ist2->sub2video.end_pts ||
+ (!ist2->sub2video.frame->data[0] && ist2->sub2video.end_pts < INT64_MAX))
sub2video_update(ist2, NULL);
for (j = 0, nb_reqs = 0; j < ist2->nb_filters; j++)
nb_reqs += av_buffersrc_get_nb_failed_requests(ist2->filters[j]->filter);