[FFmpeg-devel] [PATCH] matroskadec: partly revert "demux relevant subtitle packets after a seek" c16582579b1c6f66a86615c5808cd5b2bf17be73
wm4
nfxjfg at googlemail.com
Fri Dec 2 15:21:15 EET 2016
On Sat, 26 Nov 2016 08:27:44 +0100
Rainer Hochecker <fernetmenta at kodi.tv> wrote:
> From: Rainer Hochecker <fernetmenta at online.de>
>
>
> Alternative patch. Revert the original code because it does more harm than any good.
>
>
> Signed-off-by: Rainer Hochecker <fernetmenta at online.de>
> ---
> libavformat/matroskadec.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index f79511e..cf3de96 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -3398,18 +3398,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);
Pushed. I heavily edited the commit message to provide context - I hope
that is ok.
More information about the ffmpeg-devel
mailing list