diff options
author | Rudolf Polzer <divVerent@xonotic.org> | 2013-11-11 13:02:34 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-01 19:17:38 +0100 |
commit | b553a43667abe6af7c4d5db7a003efd70f0c8d1a (patch) | |
tree | cffed4aae4d482cb41df45ecd64ac822cb5bfa63 | |
parent | 6de5bf12a5dbfae761dce9d2584bfc828bdfac11 (diff) | |
download | mpv-b553a43667abe6af7c4d5db7a003efd70f0c8d1a.tar.bz2 mpv-b553a43667abe6af7c4d5db7a003efd70f0c8d1a.tar.xz |
vo_lavc: fix -ovoffset.
Previously, using it led to no single frame being output, ever.
-rw-r--r-- | video/out/vo_lavc.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |