set correct duration when using b frames