From a1dec6f54a31180968d3c8e5012bb3ccd1a7c716 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 18 Aug 2016 20:40:23 +0200 Subject: player: make looping slightly more seamless This affects A-B loops and --loop-file, and audio. Instead of dropping audio by resetting the AO, try to make it seamless by not sending data after the loop point, and after the seek send new data without a reset. --- player/misc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'player/misc.c') diff --git a/player/misc.c b/player/misc.c index a9174c41a9..bd65fb9d5b 100644 --- a/player/misc.c +++ b/player/misc.c @@ -90,6 +90,12 @@ double get_play_end_pts(struct MPContext *mpctx) if (cend != MP_NOPTS_VALUE && (end == MP_NOPTS_VALUE || cend < end)) end = cend; } + if (mpctx->ab_loop_clip && opts->ab_loop[1] != MP_NOPTS_VALUE && + opts->ab_loop[1] > opts->ab_loop[0]) + { + if (end == MP_NOPTS_VALUE || end > opts->ab_loop[1]) + end = opts->ab_loop[1]; + } return end; } -- cgit v1.2.3