1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-18 21:31:13 +00:00

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.
This commit is contained in:
wm4 2015-05-26 12:59:48 +02:00
parent 302901ddaf
commit bdcd25d3c2

View File

@ -389,7 +389,8 @@ static bool read_packet(struct demux_internal *in)
read_more |= ds->active && !ds->head; read_more |= ds->active && !ds->head;
packs += ds->packs; packs += ds->packs;
bytes += ds->bytes; 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; read_more |= ds->last_ts - ds->base_ts < in->min_secs;
} }
MP_DBG(in, "packets=%zd, bytes=%zd, active=%d, more=%d\n", MP_DBG(in, "packets=%zd, bytes=%zd, active=%d, more=%d\n",