summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demux/demux.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 73bc6247c2..b170b731c0 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -1222,8 +1222,10 @@ static int cached_demux_control(struct demux_internal *in, int cmd, void *arg)
struct demux_stream *ds = in->d_user->streams[n]->ds;
if (ds->active) {
r->underrun |= !ds->head && !ds->eof;
- r->ts_range[0] = MP_PTS_MAX(r->ts_range[0], ds->base_ts);
- r->ts_range[1] = MP_PTS_MIN(r->ts_range[1], ds->last_ts);
+ if (!ds->eof) {
+ r->ts_range[0] = MP_PTS_MAX(r->ts_range[0], ds->base_ts);
+ r->ts_range[1] = MP_PTS_MIN(r->ts_range[1], ds->last_ts);
+ }
}
}
r->idle = (in->idle && !r->underrun) || r->eof;