Use segment duration in buffer depth calculation Segment start,end time was used previously, which could result in problems if there are discontinuity in the streams. E.g. if the stream has timestamp, 10000, 10001, 10002 and then next segment comes in with timestamp 1. With the previous logic, all the segments would remain in the time shift buffer until after 10000 segments even with a small time shift buffer depth of 10. This could also happen when timestamp wraps around, which could happen during long time of live streaming. This change will also be useful to support multi-period live DASH. Fixes #563. Change-Id: Ie078d76c6e4af13ade9ad46191c8e3529069ed4d