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 committed by wm4
parent 6de5bf12a5
commit b553a43667
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 // we will ONLY encode this frame if it can be encoded at at least
// vc->mindeltapts after the last encoded frame! // vc->mindeltapts after the last encoded frame!
int64_t skipframes = int64_t skipframes =
vc->lastencodedipts + vc->mindeltapts - vc->lastipts; (vc->lastencodedipts == MP_NOPTS_VALUE)
? 0
: vc->lastencodedipts + vc->mindeltapts - vc->lastipts;
if (skipframes < 0) if (skipframes < 0)
skipframes = 0; skipframes = 0;