summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
Diffstat (limited to 'demux')
-rw-r--r--demux/demux.c4
-rw-r--r--demux/demux.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 50fc32cb96..61c8e40b8c 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -309,8 +309,8 @@ int demux_add_packet(struct sh_stream *stream, demux_packet_t *dp)
if (ds->refreshing) {
// Resume reading once the old position was reached (i.e. we start
// returning packets where we left off before the refresh).
- drop = true;
- if (dp->pos == ds->last_pos)
+ drop = dp->pos <= ds->last_pos;
+ if (dp->pos >= ds->last_pos)
ds->refreshing = false;
}
diff --git a/demux/demux.h b/demux/demux.h
index c580a22b18..acab2db2ba 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -195,7 +195,8 @@ typedef struct demuxer {
bool rel_seeks;
// Enable fast track switching hacks. This requires from the demuxer:
// - seeking is somewhat reliable; packet contents must not change
- // - packet position (demux_packet.pos) is set, not negative, and unique
+ // - packet position (demux_packet.pos) is set, not negative, unique, and
+ // monotonically increasing
// - seeking leaves packet positions invariant
bool allow_refresh_seeks;