diff options
author | John Stebbins <[email protected]> | 2015-11-13 19:38:02 -0800 |
---|---|---|
committer | John Stebbins <[email protected]> | 2016-01-21 10:09:44 -0700 |
commit | fcb78d5c24387bf2dad2e3c38b4417431b2836ae (patch) | |
tree | 8232f55f36175db115ee08ebd5f5e41c29c53949 /libhb/vfr.c | |
parent | 56925edbfa59cda34d3fa45f4c61f48970cee5fb (diff) |
sync: gut and rewrite
sync.c was difficult to read, fragile, and prone to difficult to
diagnose bugs (see
https://forum.handbrake.fr/viewtopic.php?f=12&t=33147)
This rewrite simplifies the code, removes signals, locking and yield
that probably cause the above problem and is much more flexible. It
fixes a wider variety of timestamp issues than before and is much easier
to extend if other timestamp analysis is desired.
Diffstat (limited to 'libhb/vfr.c')
-rw-r--r-- | libhb/vfr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libhb/vfr.c b/libhb/vfr.c index 50eddd0e7..b1ba3196a 100644 --- a/libhb/vfr.c +++ b/libhb/vfr.c @@ -501,7 +501,7 @@ static int hb_vfr_work( hb_filter_object_t * filter, // If there is a gap between the last stop and the current start // then frame(s) were dropped. - if ( in->s.start > pv->last_stop[0] ) + if (hb_fifo_size(pv->delay_queue) > 0 && in->s.start > pv->last_stop[0]) { /* We need to compensate for the time lost by dropping frame(s). Spread its duration out in quarters, because usually dropped frames |