public AMMediaType GetPmt(IMediaSampleImpl sample) { AMMediaType pmt; if (S_OK == sample.GetMediaType(out pmt)) { if (FAILED(SetMediaType(pmt))) { ASSERT(false); sample.SetMediaType(null); } pmt.Free(); } return pmt; }