summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demux/demux_lavf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 4d84bd20d4..bc5d394eba 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -856,6 +856,12 @@ static int demux_lavf_fill_buffer(demuxer_t *demux)
priv->last_pts = dp->dts * AV_TIME_BASE;
}
av_free_packet(pkt);
+
+ // Do not confuse player's position estimation (position is into segment,
+ // player knows about the playlist main file only).
+ if (matches_avinputformat_name(priv, "hls"))
+ dp->pos = -1;
+
demux_add_packet(stream, dp);
return 1;
}