[FFmpeg-devel] [PATCH 2/3] avformat/vobsub: do not attempt to check duplicate subtitles
wm4
nfxjfg at googlemail.com
Sun Sep 20 16:12:37 CEST 2015
Some .idx files actually contain duplicate subtitle events:
timestamp: 00:07:52:600, filepos: 00004e800
timestamp: 00:07:52:600, filepos: 00004f800
The second will be dropped, because it has same pts, duration, and text
(the text is just a dummy empty string; the real data is retrieved when
actually reading vobsub subtitle packets).
Dropping this is probably not intended/safe, so avoid it.
---
libavformat/mpeg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 223b690..ab1a9ca 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -857,6 +857,7 @@ static int vobsub_read_header(AVFormatContext *s)
for (i = 0; i < s->nb_streams; i++) {
vobsub->q[i].sort = SUB_SORT_POS_TS;
+ vobsub->q[i].keep_duplicates = 1;
ff_subtitles_queue_finalize(s, &vobsub->q[i]);
}
--
2.5.1
More information about the ffmpeg-devel
mailing list