private short? GetLength(StreamKind stream) { string StrValue = lastMedia.Get(stream, 0, "Duration"); int Result = 0; if (int.TryParse(StrValue, out Result)) return (short)(Result / 1000); else return null; }