Small patch

Changed it so that if the duration field is not present, it would just
attempt to get endTime + padding.

The way it was caused a lot of unecessary segments to be generated.

This change means that only a 1 out of 512 will fail but all the
pre-cached media will be properly utilised for everything else