summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
Diffstat (limited to 'demux/demux.c')
-rw-r--r--demux/demux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 404050a420..f8653b4411 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -604,6 +604,10 @@ struct demuxer *demux_open(struct stream *stream, char *force_format,
}
}
+ // Peek this much data to avoid that stream_read() run by some demuxers
+ // or stream filters will flush previous peeked data.
+ stream_peek(stream, STREAM_BUFFER_SIZE);
+
// Test demuxers from first to last, one pass for each check_levels[] entry
for (int pass = 0; check_levels[pass] != -1; pass++) {
enum demux_check level = check_levels[pass];