Commit 0885141c authored by Chris Robinson's avatar Chris Robinson Committed by Alexandre Julliard

quartz: Properly handle input parameters in FileSource_GetCurFile.

parent b90a665d
......@@ -637,6 +637,9 @@ static HRESULT WINAPI FileSource_GetCurFile(IFileSourceFilter * iface, LPOLESTR
TRACE("(%p, %p)\n", ppszFileName, pmt);
if (!ppszFileName)
return E_POINTER;
/* copy file name & media type if available, otherwise clear the outputs */
if (This->pszFileName)
{
......@@ -646,12 +649,13 @@ static HRESULT WINAPI FileSource_GetCurFile(IFileSourceFilter * iface, LPOLESTR
else
*ppszFileName = NULL;
if (This->pmt)
if (pmt)
{
CopyMediaType(pmt, This->pmt);
if (This->pmt)
CopyMediaType(pmt, This->pmt);
else
ZeroMemory(pmt, sizeof(*pmt));
}
else
ZeroMemory(pmt, sizeof(*pmt));
return S_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment