summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-02-12 19:00:38 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-13 17:45:29 -0800
commit0ec0c147ed32dd328489d3dc2833b13aa1fcd773 (patch)
tree27cac6d267dbd1e49a463631dc098ee8c70b4532
parent76947798ea1217612c6d9be226d3ca1e5d9b49d0 (diff)
downloadmpv-0ec0c147ed32dd328489d3dc2833b13aa1fcd773.tar.bz2
mpv-0ec0c147ed32dd328489d3dc2833b13aa1fcd773.tar.xz
audio: don't touch spdif frames in mp_aframe_clip_timestamps()
It can't work for this type of format.
-rw-r--r--audio/aframe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/aframe.c b/audio/aframe.c
index 9115cf67fd..cb5d412f98 100644
--- a/audio/aframe.c
+++ b/audio/aframe.c
@@ -441,12 +441,15 @@ double mp_aframe_duration(struct mp_aframe *f)
// Clip the given frame to the given timestamp range. Adjusts the frame size
// and timestamp.
+// Refuses to change spdif frames.
void mp_aframe_clip_timestamps(struct mp_aframe *f, double start, double end)
{
double f_end = mp_aframe_end_pts(f);
double rate = mp_aframe_get_effective_rate(f);
if (f_end == MP_NOPTS_VALUE)
return;
+ if (af_fmt_is_spdif(mp_aframe_get_format(f)))
+ return;
if (end != MP_NOPTS_VALUE) {
if (f_end >= end) {
if (f->pts >= end) {