diff options
author | wm4 <wm4@nowhere> | 2014-08-27 22:42:45 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-27 23:12:49 +0200 |
commit | 1c44db2992901a5ef9038e0e55aaa0b15309b727 (patch) | |
tree | 41dc18916f9ebe3125fabadce41f6ffea2ceb897 /demux | |
parent | c7208319d3406fa5f3980a1155ae9b854ab7a232 (diff) | |
download | mpv-1c44db2992901a5ef9038e0e55aaa0b15309b727.tar.bz2 mpv-1c44db2992901a5ef9038e0e55aaa0b15309b727.tar.xz |
demux: reset idle state on seeks
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/demux/demux.c b/demux/demux.c index 94b230a6dc..8ddfd3f89c 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -925,6 +925,7 @@ static void flush_locked(demuxer_t *demuxer) demuxer->in->warned_queue_overflow = false; demuxer->in->eof = false; demuxer->in->last_eof = false; + demuxer->in->idle = true; } // clear the packet queues @@ -1174,7 +1175,6 @@ static int cached_demux_control(struct demux_internal *in, int cmd, void *arg) struct demux_ctrl_reader_state *r = arg; *r = (struct demux_ctrl_reader_state){ .eof = in->last_eof, - .idle = in->idle, .ts_range = {MP_NOPTS_VALUE, MP_NOPTS_VALUE}, .ts_duration = -1, }; @@ -1186,7 +1186,7 @@ static int cached_demux_control(struct demux_internal *in, int cmd, void *arg) r->ts_range[1] = MP_PTS_MIN(r->ts_range[1], ds->last_ts); } } - r->idle = (r->idle && !r->underrun) || r->eof; + r->idle = (in->idle && !r->underrun) || r->eof; if (r->ts_range[0] != MP_NOPTS_VALUE && r->ts_range[1] != MP_NOPTS_VALUE) r->ts_duration = r->ts_range[1] - r->ts_range[0]; return DEMUXER_CTRL_OK; |