diff options
author | wm4 <wm4@nowhere> | 2015-05-26 12:59:48 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-05-26 12:59:48 +0200 |
commit | bdcd25d3c23b49704f3abe78dc0c523f20a71d45 (patch) | |
tree | 8e99dbab070e66281ca2aa3f8f2d724d33b8715f /demux | |
parent | 302901ddaf452903e9ceea7a9928d1ade2cc6b10 (diff) |
demux: don't get stuck on some cases of timestamp resets
In this case, streaming ogg via mpd over icecast made it buffer
infinitely on new tracks.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/demux/demux.c b/demux/demux.c index b99d0263c9..d4754b7bb0 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -389,7 +389,8 @@ static bool read_packet(struct demux_internal *in) read_more |= ds->active && !ds->head; packs += ds->packs; bytes += ds->bytes; - if (ds->active && ds->last_ts != MP_NOPTS_VALUE && in->min_secs > 0) + if (ds->active && ds->last_ts != MP_NOPTS_VALUE && in->min_secs > 0 && + ds->last_ts >= ds->base_ts) read_more |= ds->last_ts - ds->base_ts < in->min_secs; } MP_DBG(in, "packets=%zd, bytes=%zd, active=%d, more=%d\n", |