diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index 9a9e44b..6899bd2 100644
|
a
|
b
|
static char *dup_wchar_to_utf8(wchar_t *w)
|
| 69 | 69 | } |
| 70 | 70 | #define DECKLINK_STR OLECHAR * |
| 71 | 71 | #define DECKLINK_STRDUP dup_wchar_to_utf8 |
| | 72 | #define DECKLINK_FREE(s) SysFreeString(s) |
| 72 | 73 | #else |
| 73 | 74 | #define DECKLINK_STR const char * |
| 74 | 75 | #define DECKLINK_STRDUP av_strdup |
| | 76 | /* free() is needed for a string returned by the DeckLink SDL. */ |
| | 77 | #define DECKLINK_FREE(s) free((void *) s) |
| 75 | 78 | #endif |
| 76 | 79 | |
| 77 | 80 | HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName) |
| … |
… |
HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName)
|
| 81 | 84 | if (hr != S_OK) |
| 82 | 85 | return hr; |
| 83 | 86 | *displayName = DECKLINK_STRDUP(tmpDisplayName); |
| 84 | | /* free() is needed for a string returned by the DeckLink SDL. */ |
| 85 | | free((void *) tmpDisplayName); |
| | 87 | DECKLINK_FREE(tmpDisplayName); |
| 86 | 88 | return hr; |
| 87 | 89 | } |