From dbe496e6bec0332fb169818fe0826e982f9a30e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sat, 4 Jul 2026 15:33:20 +0200 Subject: [PATCH] demux_lavf: clear sticky avio EOF in drop_buffers A stream can report a one-shot EOF and then continue producing data (disc-nav jump boundaries). Also clear a sticky read error, the underlying source is being reused. --- demux/demux_lavf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 6c4cfcb4a2..a1ccf20cc2 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -1805,6 +1805,9 @@ static void demux_drop_buffers_lavf(demuxer_t *demuxer) stream_drop_buffers(priv->stream); avio_flush(priv->avfc->pb); avformat_flush(priv->avfc); + // Clear sticky EOF/error to reuse this demuxer. + priv->avfc->pb->eof_reached = 0; + priv->avfc->pb->error = 0; reset_dovi_split_state(demuxer); }