summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demux/demux_timeline.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/demux/demux_timeline.c b/demux/demux_timeline.c
index 03d7ddd1a3..a7024fef16 100644
--- a/demux/demux_timeline.c
+++ b/demux/demux_timeline.c
@@ -197,6 +197,11 @@ static int d_fill_buffer(struct demuxer *demuxer)
if (pkt->stream < 0)
goto drop;
+ // for refresh seeks, demux.c prefers monotonically increasing packet pos
+ // since the packet pos is meaningless anyway for timeline, use it
+ if (pkt->pos >= 0)
+ pkt->pos |= (seg->index & 0x7FFFULL) << 48;
+
struct virtual_stream *vs = &p->streams[pkt->stream];
if (pkt->pts != MP_NOPTS_VALUE && pkt->pts >= seg->end) {