[vlc-devel] [PATCH 4/5] sapi: rename filter_sys_t to filter_sapi
Thomas Guillem
thomas at gllm.fr
Wed Mar 7 17:31:58 CET 2018
ODR related.
---
modules/text_renderer/sapi.cpp | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/modules/text_renderer/sapi.cpp b/modules/text_renderer/sapi.cpp
index d64545a367..ab86d7b6a6 100644
--- a/modules/text_renderer/sapi.cpp
+++ b/modules/text_renderer/sapi.cpp
@@ -62,7 +62,7 @@ vlc_module_begin ()
add_integer("sapi-voice", -1, "Voice Index", "Voice index", false)
vlc_module_end ()
-struct filter_sys_t
+struct filter_sapi
{
ISpVoice* cpVoice;
char* lastString;
@@ -96,15 +96,16 @@ static void LeaveMTA(void)
static int Create (vlc_object_t *p_this)
{
filter_t *p_filter = (filter_t *)p_this;
- filter_sys_t *p_sys;
+ filter_sapi *p_sys;
HRESULT hr;
if (TryEnterMTA(p_this))
return VLC_EGENERIC;
- p_filter->p_sys = p_sys = (filter_sys_t*) malloc(sizeof(filter_sys_t));
+ p_sys = (filter_sapi*) malloc(sizeof(filter_sapi));
if (!p_sys)
goto error;
+ p_filter->p_sys = reinterpret_cast<filter_sys_t*>(p_sys);
p_sys->cpVoice = NULL;
p_sys->lastString = NULL;
@@ -170,7 +171,7 @@ error:
static void Destroy(vlc_object_t *p_this)
{
filter_t *p_filter = (filter_t *)p_this;
- filter_sys_t *p_sys = p_filter->p_sys;
+ filter_sapi *p_sys = reinterpret_cast<filter_sapi *>(p_filter->p_sys);
if (p_sys->cpVoice)
p_sys->cpVoice->Release();
@@ -184,7 +185,7 @@ static int RenderText(filter_t *p_filter,
subpicture_region_t *p_region_in,
const vlc_fourcc_t *)
{
- filter_sys_t *p_sys = p_filter->p_sys;
+ filter_sapi *p_sys = reinterpret_cast<filter_sapi *>(p_filter->p_sys);
text_segment_t *p_segment = p_region_in->p_text;
if (!p_segment)
--
2.11.0
More information about the vlc-devel
mailing list