From e8147843fc072c5056d99b6c162216d82f1eedc7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 7 Jun 2019 17:09:22 +0200 Subject: demux: really disable cache for sub-demuxers It seems the so called demuxer cache wasn't really disabled for sub-demuxers (timeline stuff). This was relatively harmless, since the actual packet data was shared anyway via refcounting. But with the addition of a mmap cache backend, this may change a lot. So strictly disable any caching for sub-demuxers. This assumes that users of sub-demuxers (only demux_timeline.c by now?) strictly use demux_read_any_packet(), since demux_read_packet_async() will require some minor read-ahead if a low level packet read returned a packet for a different stream. This requires some awkward messing with this fucking heap of trash. The thing that is really wrong here is that the demuxer API mixes different concepts, and sub-demuxers get the same API as decoders, and use the cache code. --- demux/demux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'demux/demux.h') diff --git a/demux/demux.h b/demux/demux.h index da315adebb..63897c342d 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -158,6 +158,7 @@ typedef struct demux_attachment } demux_attachment_t; struct demuxer_params { + bool is_top_level; // if true, it's not a sub-demuxer (enables cache etc.) char *force_format; int matroska_num_wanted_uids; struct matroska_segment_uid *matroska_wanted_uids; -- cgit v1.2.3