From 0c911c8fbc871d9368b4c172300197adc4b06991 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Wed, 18 Jun 2014 13:38:36 -0700 Subject: [PATCH] avcodec/pgssubdec: fix end display time Signed-off-by: Michael Niedermayer --- libavcodec/pgssubdec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c index f353c4c17c..b06da7a652 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -422,7 +422,10 @@ static int display_end_segment(AVCodecContext *avctx, void *data, return 1; sub->start_display_time = 0; - sub->end_display_time = 20000; + // There is no explicit end time for PGS subtitles. The end time + // is defined by the start of the next sub which may contain no + // objects (i.e. clears the previous sub) + sub->end_display_time = UINT32_MAX; sub->format = 0; sub->num_rects = ctx->presentation.object_count;