diff options
author | wm4 <wm4@nowhere> | 2014-05-24 14:03:07 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-05-24 16:17:50 +0200 |
commit | e3c20bf3505679641f247471603ad298d04036bd (patch) | |
tree | 72926a284ecd34a3d1be9de8db8d5af0ed45eba8 /player/loadfile.c | |
parent | 3316cf5f9b213dc047aa0515fbc51f12fb27cc58 (diff) | |
download | mpv-e3c20bf3505679641f247471603ad298d04036bd.tar.bz2 mpv-e3c20bf3505679641f247471603ad298d04036bd.tar.xz |
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).
Diffstat (limited to 'player/loadfile.c')
-rw-r--r-- | player/loadfile.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/player/loadfile.c b/player/loadfile.c index ccf4b6e33c..d79e82911c 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1110,8 +1110,6 @@ static void play_current_file(struct MPContext *mpctx) } mpctx->initialized_flags |= INITIALIZED_STREAM; - mpctx->stream->start_pos += opts->seek_to_byte; - if (opts->stream_dump && opts->stream_dump[0]) { stream_dump(mpctx); goto terminate_playback; @@ -1267,10 +1265,8 @@ goto_reopen_demuxer: ; else dir = DVB_CHANNEL_LOWER; - if (dvb_step_channel(mpctx->stream, dir)) { + if (dvb_step_channel(mpctx->stream, dir)) mpctx->stop_play = PT_RELOAD_DEMUXER; - mpctx->stream->start_pos = stream_tell(mpctx->stream); - } } #endif goto terminate_playback; |