[vlc-devel] [RFC] prefetch: Invalidate the cache when returning from pause
Rémi Denis-Courmont
remi at remlab.net
Fri Sep 25 17:13:04 CEST 2015
Le 2015-09-25 18:08, Luca Barbato a écrit :
> It should be done only on network streams that might or might not
> time-out, since then the stream_Read would return a spurious
> End of File.
This breaks non-seekable streams, so no go. Also duplicates the FTP
input code.
> ---
>
> The more I'm digging the more seems that this one is the simplest way
> to
> recover from network timeouts during a pause. Help in getting it
> better
> is welcome.
>
> modules/stream_filter/prefetch.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/modules/stream_filter/prefetch.c
> b/modules/stream_filter/prefetch.c
> index 42085c3..b7f8878 100644
> --- a/modules/stream_filter/prefetch.c
> +++ b/modules/stream_filter/prefetch.c
> @@ -179,6 +179,9 @@ static void *Thread(void *data)
> continue;
> }
>
> + if (ThreadSeek(stream, sys->stream_offset))
> + break;
> +
> /* Resume the underlying stream */
> msg_Dbg(stream, "resuming");
> ThreadControl(stream, STREAM_SET_PAUSE_STATE, false);
> --
> 2.6.0.rc2.10.gf4d9753.dirty
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list