audio_core: hle: mf: lint

This commit is contained in:
liushuyu 2019-02-13 15:15:11 -07:00
parent 671ac441e9
commit a4ba35fe3a
2 changed files with 6 additions and 3 deletions

View File

@ -52,6 +52,8 @@ unique_mfptr<IMFTransform> MFDecoderInit(GUID audio_format) {
if (FAILED(hr))
transform = nullptr;
activate[n]->Release();
if (SUCCEEDED(hr))
break;
}
if (transform == nullptr) {
ReportError("Failed to initialize MFT", hr);
@ -59,10 +61,11 @@ unique_mfptr<IMFTransform> MFDecoderInit(GUID audio_format) {
return nullptr;
}
CoTaskMemFree(activate);
return std::move(transform);
return transform;
}
unique_mfptr<IMFSample> CreateSample(void* data, DWORD len, DWORD alignment, LONGLONG duration) {
unique_mfptr<IMFSample> CreateSample(const void* data, DWORD len, DWORD alignment,
LONGLONG duration) {
HRESULT hr = S_OK;
unique_mfptr<IMFMediaBuffer> buf;
unique_mfptr<IMFSample> sample;

View File

@ -74,7 +74,7 @@ struct ADTSMeta {
// exported functions
unique_mfptr<IMFTransform> MFDecoderInit(GUID audio_format = MFAudioFormat_AAC);
unique_mfptr<IMFSample> CreateSample(void* data, DWORD len, DWORD alignment = 1,
unique_mfptr<IMFSample> CreateSample(const void* data, DWORD len, DWORD alignment = 1,
LONGLONG duration = 0);
bool SelectInputMediaType(IMFTransform* transform, int in_stream_id, const ADTSData& adts,
const UINT8* user_data, UINT32 user_data_len,