Nikolay Sivov (@nsivov) commented about dlls/winegstreamer/media_source.c:
+{
- IMFStreamDescriptor *descriptor;
- IMFMediaTypeHandler *handler;
- IMFMediaType *types[6];
- DWORD count = 0;
- HRESULT hr;
- if (!(types[0] = mf_media_type_from_wg_format(format)))
return MF_E_INVALIDMEDIATYPE;
- count = 1;
- if (format->major_type == WG_MAJOR_TYPE_VIDEO)
- {
if (FAILED(hr = init_video_media_types(format, types, &count)))
return hr;
- }
Assertion for 'types' element count was removed, and now you have to assume that it's not exceeded by init_video_media_types().
Also, types[0] is leaked if init_video_media_types() fails.