summaryrefslogtreecommitdiff
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-09-21 13:43:32 +0200
committerwm4 <nfxjfg@googlemail.com>2015-09-21 13:43:32 +0200
commit5c93e57f5c07b52f04363c178c4fc1892c0d71aa (patch)
tree6afb4ea64f810b32c26caef6026be60502d97acf /libavformat/mpeg.c
parentc216324a7f958f09a7ee68c5cca28fdd166fba9d (diff)
downloadffmpeg-5c93e57f5c07b52f04363c178c4fc1892c0d71aa.tar.gz
avformat/vobsub: do not attempt to check duplicate subtitles
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. See trac issue #4872 for a sample. This patch doesn't fix decoding of the sample, though.
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index a63b5672a3..55f2b3fb68 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]);
}