From 2643ddf8388068b9a92ee692bb2ba1e1660bdb27 Mon Sep 17 00:00:00 2001
From: Vasil Kolev <vasil@ludost.net>
Date: Tue, 2 Dec 2014 21:29:00 +0200
Subject: [PATCH 2/2] define DECKLINK_FREE for non-win32

---
 libavdevice/decklink_common.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index 39b96f8..8ddb310 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -72,9 +72,11 @@ static char *dup_wchar_to_utf8(wchar_t *w)
 }
 #define DECKLINK_STR    OLECHAR *
 #define DECKLINK_STRDUP dup_wchar_to_utf8
+#define DECKLINK_FREE(s) SysFreeString(s)
 #else
 #define DECKLINK_STR    const char *
 #define DECKLINK_STRDUP av_strdup
+#define DECKLINK_FREE(s) free((void *) s)
 #endif
 
 HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName)
@@ -84,8 +86,7 @@ HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName)
     if (hr != S_OK)
         return hr;
     *displayName = DECKLINK_STRDUP(tmpDisplayName);
-    /* free() is needed for a string returned by the DeckLink SDL. */
-    free((void *) tmpDisplayName);
+    DECKLINK_FREE(tmpDisplayName);
     return hr;
 }
 
-- 
2.1.3

