mirror of https://github.com/mpv-player/mpv
vo_lavc: fix -ovoffset.
Previously, using it led to no single frame being output, ever.
This commit is contained in:
parent
6de5bf12a5
commit
b553a43667
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue