summaryrefslogtreecommitdiffstats
path: root/demux/demux_lavf.c
diff options
context:
space:
mode:
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r--demux/demux_lavf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index ad2e6df6ea..1730d79716 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -250,6 +250,10 @@ static void update_read_stats(struct demuxer *demuxer)
for (int n = 0; n < priv->num_nested; n++) {
struct nested_stream *nest = &priv->nested[n];
+ // Note: accessing the bytes_read field is not allowed by FFmpeg's API.
+ // This is fully intentional - there is no other way to get this
+ // information (not even by custom I/O, because the connection reuse
+ // mechanism by the HLS demuxer would get disabled).
int64_t cur = nest->id->bytes_read;
int64_t new = cur - nest->last_bytes;
nest->last_bytes = cur;