This project has moved and is read-only. For the latest updates, please go here.

Mf Reader :: Filename with Accent

Dec 9, 2012 at 10:52 AM

In MediafoundationReader.cs (CreateReader....)

//var uri = new Uri(file);
// Obsolete 
// var uri = new Uri(file,true)

Uri nUrl = null;
string str = "";
if (Uri.TryCreate(file, UriKind.Absolute, out nUrl))
	str = nUrl.ToString();
	str = nUrl.AbsoluteUri;

MediaFoundationInterop.MFCreateSourceReaderFromURL(str, null, out reader);

Dec 11, 2012 at 1:05 PM

I'm thinking that MediaFoundationReader should simply pass the file value straight through. This seems to work fine in my tests. This would allow it to be a URL or an absolute path and fixes the problem with accents in the filename.


Dec 11, 2012 at 2:58 PM

Oh yeah, as usual your version is more simple.