diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2016-11-26 08:27:44 +0100 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2016-12-02 13:59:17 +0100 |
commit | 7a9db61da39fbfaa910c10c0719be595a7d06f3d (patch) | |
tree | 0589d120d30689cbef2531a4fedfcb41839c62dd /libavformat/matroskadec.c | |
parent | 89092fafdde894c6ba4d4f8e3cd1cce0d68bfc22 (diff) | |
download | ffmpeg-streaming-7a9db61da39fbfaa910c10c0719be595a7d06f3d.zip ffmpeg-streaming-7a9db61da39fbfaa910c10c0719be595a7d06f3d.tar.gz |
matroskadec: partly revert "demux relevant subtitle packets after a seek"
This reverts parts of c16582579b1c6f66a86615c5808cd5b2bf17be73. The hard
coded 30 seconds are a lot, and finishing the seek can takes several
seconds when the source is on a network share. Remove this code
entirely, because it does more bad than good.
(Commit message provided by committer, based on the original messages
by the patch author.)
Signed-off-by: Rainer Hochecker <fernetmenta@online.de>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index d96e861..017a533 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3399,18 +3399,6 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index, tracks[i].audio.sub_packet_cnt = 0; tracks[i].audio.buf_timecode = AV_NOPTS_VALUE; tracks[i].end_timecode = 0; - if (tracks[i].type == MATROSKA_TRACK_TYPE_SUBTITLE && - tracks[i].stream && - tracks[i].stream->discard != AVDISCARD_ALL) { - index_sub = av_index_search_timestamp( - tracks[i].stream, st->index_entries[index].timestamp, - AVSEEK_FLAG_BACKWARD); - while (index_sub >= 0 && - index_min > 0 && - tracks[i].stream->index_entries[index_sub].pos < st->index_entries[index_min].pos && - st->index_entries[index].timestamp - tracks[i].stream->index_entries[index_sub].timestamp < 30000000000 / matroska->time_scale) - index_min--; - } } avio_seek(s->pb, st->index_entries[index_min].pos, SEEK_SET); |