vo_lavc: fix -ovoffset.

Previously, using it led to no single frame being output, ever.
This commit is contained in:
Rudolf Polzer 2013-11-11 13:02:34 +01:00
parent 3cb4116243
commit 8ff577a2f3
1 changed files with 3 additions and 1 deletions

View File

@ -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;