demux_timeline: fix nested timelines

You can e.g. reference ordered chapters or other EDL files in EDLs.
There were some bugs left which broke this in some cases.
This commit is contained in:
wm4 2016-02-20 16:22:15 +01:00
parent d549c4e402
commit 297fdcc095
4 changed files with 7 additions and 6 deletions

View File

@ -31,9 +31,8 @@ estimated remaining duration of the source file is used.
Note:: Note::
mpv can't use ordered chapter files in EDL entries. Usage of relative or Usage of relative or absolute paths as well as any protocol prefixes may be
absolute paths as well as any protocol prefixes is prevented for security prevented for security reasons.
reasons.
Syntax of mpv EDL files Syntax of mpv EDL files

View File

@ -394,8 +394,7 @@ Program Behavior
``--merge-files`` ``--merge-files``
Pretend that all files passed to mpv are concatenated into a single, big Pretend that all files passed to mpv are concatenated into a single, big
file. This uses timeline/EDL support internally. Note that this won't work file. This uses timeline/EDL support internally.
for ordered chapter files.
``--no-resume-playback`` ``--no-resume-playback``
Do not restore playback position from the ``watch_later`` configuration Do not restore playback position from the ``watch_later`` configuration

View File

@ -698,6 +698,9 @@ static struct demux_packet *dequeue_packet(struct demux_stream *ds)
pkt->pts = MP_ADD_PTS(pkt->pts, ds->in->ts_offset); pkt->pts = MP_ADD_PTS(pkt->pts, ds->in->ts_offset);
pkt->dts = MP_ADD_PTS(pkt->dts, ds->in->ts_offset); pkt->dts = MP_ADD_PTS(pkt->dts, ds->in->ts_offset);
pkt->start = MP_ADD_PTS(pkt->start, ds->in->ts_offset);
pkt->end = MP_ADD_PTS(pkt->end, ds->in->ts_offset);
return pkt; return pkt;
} }

View File

@ -225,7 +225,7 @@ static int d_fill_buffer(struct demuxer *demuxer)
} }
} }
pkt->new_segment = vs->new_segment; pkt->new_segment |= vs->new_segment;
vs->new_segment = false; vs->new_segment = false;
demux_add_packet(vs->sh, pkt); demux_add_packet(vs->sh, pkt);