From a790f2133bb785e0c48a7c6cdc730c8b7e8287fb Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 Aug 2013 18:21:32 +0200 Subject: stream: move file forward skipping to common stream implementation stream_file.c contains some code meant for forward seeking with pipes. This simply reads data until the seek position is reached. Move this code to stream.c. This stops stream_file from doing strange things (messing with stream internals), and removes the code duplication too. We also make stream_seek_long() use the new skip code. This is shorter and much easier to follow than the old code, which basically did strange things. --- stream/stream.h | 1 + 1 file changed, 1 insertion(+) (limited to 'stream/stream.h') diff --git a/stream/stream.h b/stream/stream.h index 7a9b6ab909..f19ab4203f 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -58,6 +58,7 @@ enum streamtype { #define STREAM_WRITE 1 // stream->flags +#define MP_STREAM_FAST_SKIPPING 1 // allow forward seeks by skipping #define MP_STREAM_SEEK_BW 2 #define MP_STREAM_SEEK_FW 4 #define MP_STREAM_SEEK (MP_STREAM_SEEK_BW | MP_STREAM_SEEK_FW) -- cgit v1.2.3