From 1d53a8f2e725cb9e3e71a9ca70feb880747d782f Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 15 Feb 2020 15:24:58 +0100 Subject: demux_edl: warn if no_clip is used with multiple parts Well whatever. --- DOCS/edl-mpv.rst | 3 ++- demux/demux_edl.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) 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++) { -- cgit v1.2.3