diff options
author | Rudolf Polzer <divVerent@xonotic.org> | 2013-11-11 13:02:34 +0100 |
---|---|---|
committer | Rudolf Polzer <divVerent@xonotic.org> | 2013-11-11 13:02:34 +0100 |
commit | 8ff577a2f32a0a8978c52ec618cb0016cdb4c30b (patch) | |
tree | 89c33a7fc0255bb69bbc14b50ce836124c06d85f /video | |
parent | 3cb4116243e54b0452d88c70a7acd4af17cf8d02 (diff) | |
download | mpv-8ff577a2f32a0a8978c52ec618cb0016cdb4c30b.tar.bz2 mpv-8ff577a2f32a0a8978c52ec618cb0016cdb4c30b.tar.xz |
vo_lavc: fix -ovoffset.
Previously, using it led to no single frame being output, ever.
Diffstat (limited to 'video')
-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 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; |