]> git.sesse.net Git - ffmpeg/commitdiff
avformat/assdec: do not drop duplicate subtitles
authorwm4 <nfxjfg@googlemail.com>
Mon, 21 Sep 2015 11:44:37 +0000 (13:44 +0200)
committerwm4 <nfxjfg@googlemail.com>
Mon, 21 Sep 2015 11:44:37 +0000 (13:44 +0200)
Duplicates are perfectly legitimate with this format. A correct
renderer will typically show them stacked.

libavformat/assdec.c

index 5423c03f1468ea3018a415f2456cc31b48907fea..a9a2efac2e4f8c431de8803e86518bf9368179de 100644 (file)
@@ -125,6 +125,8 @@ static int ass_read_header(AVFormatContext *s)
     av_bprint_init(&line,   0, AV_BPRINT_SIZE_UNLIMITED);
     av_bprint_init(&rline,  0, AV_BPRINT_SIZE_UNLIMITED);
 
+    ass->q.keep_duplicates = 1;
+
     for (;;) {
         int64_t pos = get_line(&line, &tr);
         int64_t ts_start = AV_NOPTS_VALUE;