MCPcopy Create free account
hub / github.com/Nevcairiel/LAVFilters / GetString

Method GetString

decoder/LAVVideo/subtitles/SubRenderOptionsImpl.cpp:106–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106STDMETHODIMP CSubRenderOptionsImpl::GetString(LPCSTR field, LPWSTR *value, int *chars)
107{
108 GET_OPT_AND_VALIDATE(SROPT_TYPE_STRING)
109 CheckPointer(chars, E_POINTER);
110
111 const LPWSTR string = *(LPWSTR *)(((uint8_t *)context) + o->offset);
112 if (!string)
113 {
114 *value = nullptr;
115 *chars = 0;
116 return S_OK;
117 }
118
119 *chars = (int)wcslen(string);
120 *value = (LPWSTR)LocalAlloc(0, sizeof(WCHAR) * (*chars + 1));
121 CheckPointer(*value, E_OUTOFMEMORY);
122 wcscpy_s(*value, *chars + 1, string);
123
124 return S_OK;
125}
126
127STDMETHODIMP CSubRenderOptionsImpl::GetBin(LPCSTR field, LPVOID *value, int *size)
128{

Callers 1

StartStreamingMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected