From 32cc190a552551cc7e7150e8603b6a75e0a6d94f Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 7 Aug 2016 14:06:54 +0200 Subject: player: fix display-sync timing if audio take long on resume In display-sync mode, the very first video frame is idiotically fully timed, even though audio has not been synced yet at this point, and the video frame is more like a "preview" frame. But since it's fully timed, an underflow is detected if audio takes longer than the display time of the frame (we send the second frame only after audio is done). The timing code will try to compensate for the determined desync, but it really shouldn't. So explicitly discard the timing info in this specific case. On the other hand, if the first frame still hasn't finished display, we can pretend everything is ok. This is a hack - ideally, we either would send a frame without timing info (and then send it again or so when playback starts properly), or we would add real pause support to the VO, and pause it during syncing. --- video/out/vo.h | 1 + 1 file changed, 1 insertion(+) (limited to 'video/out/vo.h') diff --git a/video/out/vo.h b/video/out/vo.h index 511954c153..a5280e5611 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -366,6 +366,7 @@ double vo_get_estimated_vsync_interval(struct vo *vo); double vo_get_estimated_vsync_jitter(struct vo *vo); double vo_get_display_fps(struct vo *vo); double vo_get_delay(struct vo *vo); +void vo_discard_timing_info(struct vo *vo); void vo_wakeup(struct vo *vo); void vo_wait_default(struct vo *vo, int64_t until_time); -- cgit v1.2.3