Mf Reader :: Filename with Accent

Dec 9, 2012 at 9: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 12: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 1:58 PM

Oh yeah, as usual your version is more simple.