From 8ff577a2f32a0a8978c52ec618cb0016cdb4c30b Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 11 Nov 2013 13:02:34 +0100 Subject: vo_lavc: fix -ovoffset. Previously, using it led to no single frame being output, ever. --- video/out/vo_lavc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'video') diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c index a5ef55e6cb..b1416b7fe3 100644 --- a/video/out/vo_lavc.c +++ b/video/out/vo_lavc.c @@ -410,7 +410,9 @@ static void draw_image(struct vo *vo, mp_image_t *mpi) // we will ONLY encode this frame if it can be encoded at at least // vc->mindeltapts after the last encoded frame! int64_t skipframes = - vc->lastencodedipts + vc->mindeltapts - vc->lastipts; + (vc->lastencodedipts == MP_NOPTS_VALUE) + ? 0 + : vc->lastencodedipts + vc->mindeltapts - vc->lastipts; if (skipframes < 0) skipframes = 0; -- cgit v1.2.3