HLS discontinuity and DASH period transition handling