lavf: Detect discontinuities in timestamps for framerate/analyzeduration calculation