avcodec/pgssubdec: fix end display time
authorJohn Stebbins <stebbins@jetheaddev.com>
Wed, 18 Jun 2014 20:38:36 +0000 (13:38 -0700)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 30 Jun 2014 15:33:53 +0000 (17:33 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/pgssubdec.c

index f353c4c..b06da7a 100644 (file)
@@ -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;