From 57a4cabd78aba3d6c1dd4802b0e3baf5ed3e4758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Thu, 10 Nov 2016 17:55:15 +0100 Subject: DirectShow: Sanitize DirectShowMediaType The DirectShowMediaType is now a thin data wrapper around AM_MEDIA_TYPE and will for the most look and work the same way, with the exception that it cleans up after itself. All utility functions are now static, except clear() which, for convenience, is also provided as a non-static member function. In addition to the changes mentioned above, duplicated methods were removed, conversion for ARGB32 was added, and an attempt to make the usage of AM_MEDIA_TYPE and DirectShowMediaType was made more consistent. Change-Id: Iad32fb8eeabd9d4183e9bd10426cac3963e5d99a Reviewed-by: Yoann Lopes --- src/plugins/directshow/helpers/directshowmediatypeenum.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/directshow/helpers/directshowmediatypeenum.cpp') diff --git a/src/plugins/directshow/helpers/directshowmediatypeenum.cpp b/src/plugins/directshow/helpers/directshowmediatypeenum.cpp index a1c8b2306..a58993f7f 100644 --- a/src/plugins/directshow/helpers/directshowmediatypeenum.cpp +++ b/src/plugins/directshow/helpers/directshowmediatypeenum.cpp @@ -72,7 +72,7 @@ HRESULT DirectShowMediaTypeEnum::Next(ULONG cMediaTypes, AM_MEDIA_TYPE **ppMedia for (ULONG i = 0; i < count; ++i, ++m_index) { ppMediaTypes[i] = reinterpret_cast(CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE))); - DirectShowMediaType::copy(ppMediaTypes[i], m_mediaTypes.at(m_index)); + DirectShowMediaType::copy(ppMediaTypes[i], &m_mediaTypes.at(m_index)); } if (pcFetched) -- cgit v1.2.3