Showing the changes to libavdevice/decklink_common.cpp (1 of 1 file). Show all
Unified · Split
| @@ -69,9 +69,12 @@ static char *dup_wchar_to_utf8(wchar_t *w) · 68 unmodified lines | |||
| 69 | } | 69 | } |
| 70 | #define DECKLINK_STR OLECHAR * | 70 | #define DECKLINK_STR OLECHAR * |
| 71 | #define DECKLINK_STRDUP dup_wchar_to_utf8 | 71 | #define DECKLINK_STRDUP dup_wchar_to_utf8 |
| 72 | #define DECKLINK_FREE(s) SysFreeString(s) | ||
| 72 | #else | 73 | #else |
| 73 | #define DECKLINK_STR const char * | 74 | #define DECKLINK_STR const char * |
| 74 | #define DECKLINK_STRDUP av_strdup | 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 | #endif | 78 | #endif |
| 76 | 79 | ||
| 77 | HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName) | 80 | HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName) |
| @@ -81,8 +84,7 @@ HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName) · 3 unmodified lines | |||
| 81 | if (hr != S_OK) | 84 | if (hr != S_OK) |
| 82 | return hr; | 85 | return hr; |
| 83 | *displayName = DECKLINK_STRDUP(tmpDisplayName); | 86 | *displayName = DECKLINK_STRDUP(tmpDisplayName); |
| 84 | /* free() is needed for a string returned by the DeckLink SDL. */ | 87 | DECKLINK_FREE(tmpDisplayName); |
| 85 | free((void *) tmpDisplayName); | ||
| 86 | return hr; | 88 | return hr; |
| 87 | } | 89 | } |
| 88 | 90 | ||