Re: [FFmpeg-devel] [PATCH] matroskadec: partly revert "demux relevant subtitle packets after a seek" c16582579b1c6f66a86615c5808cd5b2bf17be73

2016-12-02 Thread Rainer Hochecker
absolutely. thanks!
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] matroskadec: partly revert "demux relevant subtitle packets after a seek" c16582579b1c6f66a86615c5808cd5b2bf17be73

2016-12-02 Thread wm4
On Sat, 26 Nov 2016 08:27:44 +0100
Rainer Hochecker  wrote:

> From: Rainer Hochecker 
> 
> 
> Alternative patch. Revert the original code because it does more harm than 
> any good.
> 
> 
> Signed-off-by: Rainer Hochecker 
> ---
>  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 < 300 / 
> 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.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] matroskadec: partly revert "demux relevant subtitle packets after a seek" c16582579b1c6f66a86615c5808cd5b2bf17be73

2016-12-01 Thread wm4
On Thu, 1 Dec 2016 08:26:44 +0100
Rainer Hochecker  wrote:

> We already included this patch in Kodi v17. Dropping this incomplete
> feature is much better than living with the downsides. Having files on a
> network share is a common use case and in most cases there is no index
> anyway: start video and seek forward.

Will push this patch in 24 hours, then.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] matroskadec: partly revert "demux relevant subtitle packets after a seek" c16582579b1c6f66a86615c5808cd5b2bf17be73

2016-11-30 Thread Rainer Hochecker
We already included this patch in Kodi v17. Dropping this incomplete
feature is much better than living with the downsides. Having files on a
network share is a common use case and in most cases there is no index
anyway: start video and seek forward.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] matroskadec: partly revert "demux relevant subtitle packets after a seek" c16582579b1c6f66a86615c5808cd5b2bf17be73

2016-11-30 Thread wm4
On Sat, 26 Nov 2016 08:27:44 +0100
Rainer Hochecker  wrote:

> From: Rainer Hochecker 
> 
> 
> Alternative patch. Revert the original code because it does more harm than 
> any good.
> 
> 
> Signed-off-by: Rainer Hochecker 
> ---
>  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 < 300 / 
> matroska->time_scale)
> -index_min--;
> -}
>  }
>  
>  avio_seek(s->pb, st->index_entries[index_min].pos, SEEK_SET);

I can push this if you're ok with it.

I think "someone" should add support for fetching overlapping subtitles
via cue indexes too. (Although it looks like AVIndexEntry makes this
annoying, so it won't be me.)
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel