diff options
author | wm4 <wm4@nowhere> | 2015-02-03 19:32:30 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-03 19:32:30 +0100 |
commit | e6664e94a12991534b9217e677fed8515a3446d7 (patch) | |
tree | 11edf28f36969004f3e4e5f9f0109f405699759e /demux | |
parent | fd78d775865f019b2af59812f9c3f8c95ae4ac03 (diff) | |
download | mpv-e6664e94a12991534b9217e677fed8515a3446d7.tar.bz2 mpv-e6664e94a12991534b9217e677fed8515a3446d7.tar.xz |
demux_disc: fix CDDA seekability
The only reason why cdda:// goes through this wrapper-demuxer is so that
we add chapters to it. Most things related to seeking apply only to
DVD/BD, and in fact broke CDDA sekkability.
Fixes #1555.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_disc.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/demux/demux_disc.c b/demux/demux_disc.c index 37b189861f..afa8de2298 100644 --- a/demux/demux_disc.c +++ b/demux/demux_disc.c @@ -229,6 +229,11 @@ static int d_fill_buffer(demuxer_t *demuxer) return 1; } + if (demuxer->stream->uncached_type == STREAMTYPE_CDDA) { + demux_add_packet(sh, pkt); + return 1; + } + MP_TRACE(demuxer, "ipts: %d %f %f\n", sh->type, pkt->pts, pkt->dts); if (sh->type == STREAM_SUB) { @@ -311,16 +316,18 @@ static int d_open(demuxer_t *demuxer, enum demux_check check) // So that we don't miss initial packets of delayed subtitle streams. demux_set_stream_autoselect(p->slave, true); - // Can be seekable even if the stream isn't. - demuxer->seekable = true; - - demuxer->rel_seeks = true; - // With cache enabled, the stream can be seekable. This causes demux_lavf.c // (actually libavformat/mpegts.c) to seek sometimes when reading a packet. // It does this to seek back a bit in case the current file position points // into the middle of a packet. - demuxer->stream->seekable = false; + if (demuxer->stream->uncached_type != STREAMTYPE_CDDA) { + demuxer->stream->seekable = false; + + // Can be seekable even if the stream isn't. + demuxer->seekable = true; + + demuxer->rel_seeks = true; + } add_dvd_streams(demuxer); add_streams(demuxer); |