summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-15 15:24:58 +0100
committerwm4 <wm4@nowhere>2020-02-15 15:25:12 +0100
commit1d53a8f2e725cb9e3e71a9ca70feb880747d782f (patch)
tree8f06ff450b38713cbdede0720e5fe01d3661a804
parent921f316281588165c6229bb675d84372353ac5ec (diff)
downloadmpv-1d53a8f2e725cb9e3e71a9ca70feb880747d782f.tar.bz2
mpv-1d53a8f2e725cb9e3e71a9ca70feb880747d782f.tar.xz
demux_edl: warn if no_clip is used with multiple parts
Well whatever.
-rw-r--r--DOCS/edl-mpv.rst3
-rw-r--r--demux/demux_edl.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/DOCS/edl-mpv.rst b/DOCS/edl-mpv.rst
index bff252ddff..495b27279e 100644
--- a/DOCS/edl-mpv.rst
+++ b/DOCS/edl-mpv.rst
@@ -146,7 +146,8 @@ The current implementation will
Another header part of this mechanism is ``no_clip``. This header is similar
to ``mp4_dash``, but does not include on-demand opening/closing of segments,
and does not support init segments. It also exists solely to support internal
-ytdl requirements.
+ytdl requirements. Using ``no_clip`` with segments is not recommended and
+probably breaks. ``mp4_dash`` already implicitly does a variant of ``no_clip``.
The ``mp4_dash`` and ``no_clip`` headers are not part of the core EDL format.
They may be changed or removed at any time, depending on mpv's internal
diff --git a/demux/demux_edl.c b/demux/demux_edl.c
index 655af8b0e0..6e1af373ee 100644
--- a/demux/demux_edl.c
+++ b/demux/demux_edl.c
@@ -429,6 +429,9 @@ static struct timeline_par *build_timeline(struct timeline *root,
tl->num_parts++;
}
+ if (tl->no_clip && tl->num_parts > 1)
+ MP_WARN(root, "Multiple parts with no_clip. Undefined behavior ahead.\n");
+
if (!tl->track_layout) {
// Use a heuristic to select the "broadest" part as layout.
for (int n = 0; n < parts->num_parts; n++) {