diff options
author | Underground78 <underground78@users.sourceforge.net> | 2013-05-26 19:02:58 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2013-05-26 20:01:35 +0400 |
commit | 02c9d31589acc72feb5e17d081722d938ebc57a5 (patch) | |
tree | 6a0ff3da25adf38101bb26ac32833b94eac2fab5 /demuxer | |
parent | 781eb4877c752d4c230518abb59a6528a8db2970 (diff) |
GetFormats: Add missing parenthesis in ca01976e1997.
The loop was previously working only for the first iteration.
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'demuxer')
-rw-r--r-- | demuxer/LAVSplitter/LAVSplitter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/demuxer/LAVSplitter/LAVSplitter.cpp b/demuxer/LAVSplitter/LAVSplitter.cpp index a7dc417d..704255f3 100644 --- a/demuxer/LAVSplitter/LAVSplitter.cpp +++ b/demuxer/LAVSplitter/LAVSplitter.cpp @@ -1774,16 +1774,16 @@ STDMETHODIMP CLAVSplitter::GetFormats(LPSTR** formats, UINT* nFormats) size_t i = 0; for (auto it = m_InputFormats.begin(); it != m_InputFormats.end(); it++, i++) { size_t len = strlen(it->strName) + 1; - *formats[i] = (LPSTR)CoTaskMemAlloc(sizeof(CHAR) * len); - if (!*formats[i]) { + (*formats)[i] = (LPSTR)CoTaskMemAlloc(sizeof(CHAR) * len); + if (!(*formats)[i]) { break; } - strcpy_s(*formats[i], len, it->strName); + strcpy_s((*formats)[i], len, it->strName); } if (i != *nFormats) { for (size_t j = 0; j < i; j++) { - CoTaskMemFree(*formats[i]); + CoTaskMemFree((*formats)[i]); } CoTaskMemFree(*formats); *formats = NULL; |