summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-10-23 11:28:31 +0200
committerwm4 <wm4@nowhere>2017-10-23 11:31:45 +0200
commit34676fc94dac6a126dd833d9094409dc6e610351 (patch)
tree9a603a26037674696f9757d5b3a534fd9ff2c960
parent0358cca39e4f0b97870a378675438634868ad458 (diff)
downloadmpv-34676fc94dac6a126dd833d9094409dc6e610351.tar.bz2
mpv-34676fc94dac6a126dd833d9094409dc6e610351.tar.xz
demux: fix crash with cue/ordered chapter files
If a packet uses segmentation, the codec field must be set. Copying the codec field was forgotten as an oversight, which is why this just crashes. This showed up only now, because demux_copy_packet() was not used before in the main demux path until recently. Fixes #5027.
-rw-r--r--demux/packet.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/demux/packet.c b/demux/packet.c
index fd1754bd88..ee49bd2acb 100644
--- a/demux/packet.c
+++ b/demux/packet.c
@@ -112,6 +112,7 @@ void demux_packet_copy_attribs(struct demux_packet *dst, struct demux_packet *sr
dst->start = src->start;
dst->end = src->end;
dst->new_segment = src->new_segment;
+ dst->codec = src->codec;
dst->keyframe = src->keyframe;
dst->stream = src->stream;
}