summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-01-05 14:23:42 +0100
committerwm4 <wm4@nowhere>2019-09-19 20:37:04 +0200
commit8ba484f47cbb179bbea793b4f4ebd0f6b8e412a6 (patch)
tree9ccb2dbf5f38f38d07191d3d1e271aed21e30e6d /demux
parentb157e22838e720b7e3b501f6564110a3692f81de (diff)
downloadmpv-8ba484f47cbb179bbea793b4f4ebd0f6b8e412a6.tar.bz2
mpv-8ba484f47cbb179bbea793b4f4ebd0f6b8e412a6.tar.xz
demux_timeline: disable end-of-segment handling in DASH mode
Normal EDL needs to clip packets coming from the underlying demuxer to the segment range (including complicated stuff due to frame reordering). This is unwanted In pseudo-DASH mode. A broken or subtly incorrect manifest would lead to "bad stuff" happening. The intention of the pseudo-DASH mode is to literally concatenate fragments.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_timeline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/demux/demux_timeline.c b/demux/demux_timeline.c
index 7364ce8399..6728bb31b0 100644
--- a/demux/demux_timeline.c
+++ b/demux/demux_timeline.c
@@ -304,7 +304,7 @@ static bool d_read_packet(struct demuxer *demuxer, struct demux_packet **out_pkt
assert(seg && seg->d);
struct demux_packet *pkt = demux_read_any_packet(seg->d);
- if (!pkt || pkt->pts >= seg->end)
+ if (!pkt || (!src->dash && pkt->pts >= seg->end))
src->eos_packets += 1;
update_slave_stats(demuxer, seg->d);
@@ -370,7 +370,7 @@ static bool d_read_packet(struct demuxer *demuxer, struct demux_packet **out_pkt
if (pkt->pos >= 0)
pkt->pos |= (seg->index & 0x7FFFULL) << 48;
- if (pkt->pts != MP_NOPTS_VALUE && pkt->pts >= seg->end) {
+ if (pkt->pts != MP_NOPTS_VALUE && !src->dash && pkt->pts >= seg->end) {
// Trust the keyframe flag. Might not always be a good idea, but will
// be sufficient at least with mkv. The problem is that this flag is
// not well-defined in libavformat and is container-dependent.