mpv/demux
wm4 0bf0efd6d3 demux_edl: fix reusing segment source files
EDL files can have multiple segments taken from the same source file. In
this case, the source file is supposed to be opened only once. This
stopped working, and it created a new demuxer instance for every single
segment entry. This made it slow and made it use much more memory than
needed.

This was because it tried to iterate over the array of source files, but
the array count (num_parts) was only set to a non-0 value later. Fix
this by maintaining the count correctly.

In addition, the actual code for checking whether a source can be reused
(in open_source()) regressed and stopped working correctly. d->stream
could be NULL. Use demuxer.filename instead; I'm not entirely sure
whether this is always correct, but fortunately we have a distributed
almost-AI driven test suite (called "users") which will probably find
and report such cases.

Probably broke with commit a09396ee60 or something close, but didn't
check closer.

Fixes: #7267
2019-12-17 01:57:42 +01:00
..
cache.c demux: add a on-disk cache 2019-09-19 20:37:05 +02:00
cache.h demux: add a on-disk cache 2019-09-19 20:37:05 +02:00
codec_tags.c codec_tags: fix wrong buffer size 2019-07-03 17:47:24 +03:00
codec_tags.h
cue.c
cue.h
demux.c demux: do not make up demuxer_id 2019-12-03 21:04:53 +01:00
demux.h stats, demux: log byte level stream seeks 2019-11-07 22:53:13 +01:00
demux_cue.c stream: turn into a ring buffer, make size configurable 2019-11-06 21:36:02 +01:00
demux_disc.c stream: turn into a ring buffer, make size configurable 2019-11-06 21:36:02 +01:00
demux_edl.c demux_edl: fix reusing segment source files 2019-12-17 01:57:42 +01:00
demux_lavf.c demux_lavf: export demuxer_id for more formats which have it 2019-12-03 21:15:40 +01:00
demux_libarchive.c stream: turn into a ring buffer, make size configurable 2019-11-06 21:36:02 +01:00
demux_mf.c demux_mf: fix backward seeking behavior 2019-11-17 02:11:45 +01:00
demux_mkv.c demux: do not make up demuxer_id 2019-12-03 21:04:53 +01:00
demux_mkv_timeline.c options: get rid of GLOBAL_CONFIG hack 2019-11-29 12:14:43 +01:00
demux_null.c
demux_playlist.c demux_playlist: fix previous commit 2019-11-15 12:10:01 +01:00
demux_raw.c stream: replace STREAM_CTRL_GET_SIZE with a proper entrypoint 2019-11-07 22:53:13 +01:00
demux_timeline.c demux: do not make up demuxer_id 2019-12-03 21:04:53 +01:00
ebml.c demux_mkv, stream: attempt to improve behavior in unseekable streams 2019-11-14 12:59:14 +01:00
ebml.h
matroska.h
packet.c packet: fix theoretical UB if called on "empty" packets 2019-09-19 20:37:05 +02:00
packet.h demux: add a on-disk cache 2019-09-19 20:37:05 +02:00
stheader.h video, demux: rip out unused spherical metadata code 2019-10-17 22:49:26 +02:00
timeline.c demux_edl, cue, mkv: slightly nicer file format indication 2019-09-19 20:37:04 +02:00
timeline.h demux_timeline, demux_edl: correctly enable cache in pseudo-DASH mode 2019-10-08 23:55:05 +02:00