[FFmpeg-devel] Patch for heap corruption run time error in decklink_common.cpp
Ok here a second run, I try to follow the instruction from Carl Eugen. This is the first patch for decklink_common.cpp. It fix this error: Unhandled exception at 0x76FA4102 (ntdll.dll) in ffmpeg.exe: 0xC374: A heap has been corrupted (parameters: 0x7701B4B0). Regards Jonathan From e9bc8e910f515af4030054df3e6feb308f3208aa Mon Sep 17 00:00:00 2001 From: Jonathan Baecker jonba...@gmail.com Date: Tue, 2 Dec 2014 20:10:41 +0100 Subject: [PATCH 1/2] heap corruption run time error in decklink_common Signed-off-by: Jonathan Baecker jonba...@gmail.com --- libavdevice/decklink_common.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index 9a9e44b..8eff910 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -69,9 +69,12 @@ static char *dup_wchar_to_utf8(wchar_t *w) } #define DECKLINK_STROLECHAR * #define DECKLINK_STRDUP dup_wchar_to_utf8 +#define DECKLINK_FREE(s) SysFreeString(s) #else #define DECKLINK_STRconst char * #define DECKLINK_STRDUP av_strdup +/* free() is needed for a string returned by the DeckLink SDL. */ +#define DECKLINK_FREE(s) free((void *) s) #endif 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) 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.2.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Patch for heap corruption run time error in decklink_common.cpp
On 02.12.2014 20:28, Jon bae wrote: Ok here a second run, I try to follow the instruction from Carl Eugen. This is the first patch for decklink_common.cpp. It fix this error: Unhandled exception at 0x76FA4102 (ntdll.dll) in ffmpeg.exe: 0xC374: A heap has been corrupted (parameters: 0x7701B4B0). From e9bc8e910f515af4030054df3e6feb308f3208aa Mon Sep 17 00:00:00 2001 From: Jonathan Baecker jonba...@gmail.com Date: Tue, 2 Dec 2014 20:10:41 +0100 Subject: [PATCH 1/2] heap corruption run time error in decklink_common Signed-off-by: Jonathan Baecker jonba...@gmail.com --- libavdevice/decklink_common.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index 9a9e44b..8eff910 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -69,9 +69,12 @@ static char *dup_wchar_to_utf8(wchar_t *w) } #define DECKLINK_STROLECHAR * #define DECKLINK_STRDUP dup_wchar_to_utf8 +#define DECKLINK_FREE(s) SysFreeString(s) #else #define DECKLINK_STRconst char * #define DECKLINK_STRDUP av_strdup +/* free() is needed for a string returned by the DeckLink SDL. */ +#define DECKLINK_FREE(s) free((void *) s) #endif 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) 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; } LGTM ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Patch for heap corruption run time error in decklink_common.cpp
On Wed, Dec 03, 2014 at 12:35:32AM +0100, Ramiro Polla wrote: On 02.12.2014 20:28, Jon bae wrote: Ok here a second run, I try to follow the instruction from Carl Eugen. This is the first patch for decklink_common.cpp. It fix this error: Unhandled exception at 0x76FA4102 (ntdll.dll) in ffmpeg.exe: 0xC374: A heap has been corrupted (parameters: 0x7701B4B0). From e9bc8e910f515af4030054df3e6feb308f3208aa Mon Sep 17 00:00:00 2001 From: Jonathan Baecker jonba...@gmail.com Date: Tue, 2 Dec 2014 20:10:41 +0100 Subject: [PATCH 1/2] heap corruption run time error in decklink_common Signed-off-by: Jonathan Baecker jonba...@gmail.com --- libavdevice/decklink_common.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index 9a9e44b..8eff910 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -69,9 +69,12 @@ static char *dup_wchar_to_utf8(wchar_t *w) } #define DECKLINK_STROLECHAR * #define DECKLINK_STRDUP dup_wchar_to_utf8 +#define DECKLINK_FREE(s) SysFreeString(s) #else #define DECKLINK_STRconst char * #define DECKLINK_STRDUP av_strdup +/* free() is needed for a string returned by the DeckLink SDL. */ +#define DECKLINK_FREE(s) free((void *) s) #endif 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) 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; } LGTM applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Republics decline into democracies and democracies degenerate into despotisms. -- Aristotle signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel