void PlayClick(object sender, RoutedEventArgs e) { if (this.encoder != null) { var decoder = new VideoDecoder(this.encoder.Stream, this.encoder.Format, this.encoder.SampleLength); this.media.SetSource(decoder); } }