title: how to load thumbnail from MediaStreamSource
body: <p>I'm trying to get a thumbnail from a <code>MediaStreamSource</code> and show it in an <code>Image</code> control using this code:</p>
  
  <pre><code>try
  {
      var img = new BitmapImage();
      img.SetSource(await mss.Thumbnail.OpenReadAsync());
      imgThumbnail.ImageSource = img;
      mediaElement.PosterSource = img;
  }
  catch (Exception ex) 
  { 
      Output("poster exception: "+ ex.Message); 
  }
  </code></pre>
  
  <p>but I'm getting an exception:</p>
  
  <blockquote>
    <p>poster exception: Object reference not set to an instance of an object.</p>
  </blockquote>
  
  <p>How can I fix this?</p>
  
  <p>Thanks</p>