Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2013-05-26 19:02:58 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2013-05-26 20:01:35 +0400
commit02c9d31589acc72feb5e17d081722d938ebc57a5 (patch)
tree6a0ff3da25adf38101bb26ac32833b94eac2fab5 /demuxer
parent781eb4877c752d4c230518abb59a6528a8db2970 (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.cpp8
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;