I am trying to set PKEY_Media_Publisher for mp4 files.
This is how I am doing it (I don't have error checking here.):
IShellItem2 * shellItem = NULL; IPropertyStore * propStore = NULL; PROPVARIANT value; hr = SHCreateItemFromParsingName(wchOutputVideoFile, NULL, IID_PPV_ARGS(&shellItem)); hr = shellItem->GetPropertyStore(GPS_READWRITE, __uuidof(IPropertyStore), (void**)&propStore); value.vt = VT_LPWSTR; value.pwszVal = L"My Publisher"; hr = propStore->SetValue(PKEY_Media_Publisher, value); hr = propStore->Commit();
This works fine for regular mp4 files created with IMFSinkWriter.
However, for mp4 files created with MFCreateFMPEG4MediaSink the "Commit" call fails with E_FAIL.
Does anybody know why this might happen?