On 2/2/22 06:28, RĂ©mi Bernon wrote:
- if (IsEqualGUID(&subtype, &MFAudioFormat_Float))
sample_size = 32;
- else if (IsEqualGUID(&subtype, &MFAudioFormat_PCM))
sample_size = 16;
- else
- {
FIXME("Subtype %s not implemented!\n", debugstr_guid(&subtype));
hr = E_NOTIMPL;
return hr;
- }
This seems a bit redundant :-)
- if (FAILED(IMFMediaType_SetUINT32(decoder->input_type, &MF_MT_AUDIO_BITS_PER_SAMPLE, sample_size)))
return MF_E_INVALIDMEDIATYPE;
- if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, &item_type)) ||
item_type != MF_ATTRIBUTE_UINT32)
return MF_E_INVALIDMEDIATYPE;
- if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &item_type)) ||
item_type != MF_ATTRIBUTE_UINT32)
return MF_E_INVALIDMEDIATYPE;
- if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_NUM_CHANNELS, &item_type)) ||
item_type != MF_ATTRIBUTE_UINT32)
return MF_E_INVALIDMEDIATYPE;
- if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &item_type)) ||
item_type != MF_ATTRIBUTE_UINT32)
return MF_E_INVALIDMEDIATYPE;
- if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &item_type)) ||
item_type != MF_ATTRIBUTE_UINT32)
return MF_E_INVALIDMEDIATYPE;
- if (!decoder->output_type && FAILED(hr = MFCreateMediaType(&decoder->output_type)))
return hr;
- if (FAILED(hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *)decoder->output_type)))
goto failed;
This also seems redundant, being the only user of this label.