Changes to make more robust to returning movie segments of length shorter than requested.