From e3c20bf3505679641f247471603ad298d04036bd Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 24 May 2014 14:03:07 +0200 Subject: stream: kill start_pos, remove --sb option stream.start_pos was needed for optical media only, and (apparently) not for very good reasons. Just get rid of it. For stream_dvd, we don't need to do anything. Byte seeking was already removed from it earlier. For stream_cdda and stream_vcd, emulate the start_pos by offsetting the stream pos as seen by the rest of mpv. The bits in discnav.c and loadfile.c were for dealing with the code seeking back to the start in demux.c. Handle this differently by assuming the demuxer is always initialized with the stream at start position, and instead seek back if initializing the demuxer fails. Remove the --sb option, which worked by modifying stream.start_pos. If someone really wants this option, it could be added back by creating a "slice" stream (actually ffmpeg already has such a thing). --- stream/stream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stream/stream.h') diff --git a/stream/stream.h b/stream/stream.h index 3675ea9732..2182de2526 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -147,7 +147,7 @@ typedef struct stream { int sector_size; // sector size (seek will be aligned on this size if non 0) int read_chunk; // maximum amount of data to read at once to limit latency unsigned int buf_pos, buf_len; - int64_t pos, start_pos, end_pos; + int64_t pos, end_pos; int eof; int mode; //STREAM_READ or STREAM_WRITE bool streaming; // known to be a network stream if true -- cgit v1.2.3