From b4173c1fd2b732a2e1a69e3cf8f96bbe4ecc3ed5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 26 Apr 2018 20:30:27 +0200 Subject: encode: do not clear video PTS on VOCTRL_RESET This was supposed to be a replacement for encode_lavc_discontinuity() (so we don't need to store last_video_in_pts in a way which requires synchronization). Unfortunately, VOCTRL_RESET is also called before termination, and even though it shouldn't matter as far as the VO API is concerned, it does. It's because vo_lavc.c buffers a frame to compute the frame duration. Drop this code. The consequence is that it appears to encode 2 frames with the same PTS if multiple files are encoded into one. Before this, it merely dropped a frame (maybe the first of every subsequent file, not sure). --- video/out/vo_lavc.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c index c6d363eed7..3e0b338b68 100644 --- a/video/out/vo_lavc.c +++ b/video/out/vo_lavc.c @@ -384,14 +384,6 @@ static void flip_page(struct vo *vo) static int control(struct vo *vo, uint32_t request, void *data) { - struct priv *vc = vo->priv; - - switch (request) { - case VOCTRL_RESET: - vc->last_video_in_pts = MP_NOPTS_VALUE; - break; - } - return VO_NOTIMPL; } -- cgit v1.2.3