lavc: add a convenience function for rescaling timestamps in a packet