From b553a43667abe6af7c4d5db7a003efd70f0c8d1a 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(-) diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c index a2cd9e048b..b42579c600 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