diff options
-rw-r--r-- | libhb/vfr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libhb/vfr.c b/libhb/vfr.c index 8bd731b74..8e50d5b89 100644 --- a/libhb/vfr.c +++ b/libhb/vfr.c @@ -539,6 +539,14 @@ static int hb_vfr_work( hb_filter_object_t * filter, pv->total_lost_time += temp_duration; } + else if ( in->s.stop <= pv->last_stop[0] ) + { + // This is generally an error somewhere (bad source or hb bug). + // But lets do our best to straighten out the mess. + ++pv->drops; + hb_buffer_close(&in); + return HB_FILTER_OK; + } /* Cache frame start and stop times, so we can renumber time stamps if dropping frames for VFR. */ |