1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avutil/wchar_filename: Make the header C++ compatible

When compiling decklink, this header is included from
a C++ file (albeit inside 'extern "C"') and this
causes compilation failures because of an implicit
void* -> char* conversion. So add an explicit cast.
Fixes ticket #9819.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-06-28 06:24:17 +02:00
parent c471cc7474
commit 4454142782

View File

@ -54,7 +54,7 @@ static inline int wchartocp(unsigned int code_page, const wchar_t *filename_w,
*filename = NULL;
return 0;
}
*filename = av_malloc_array(num_chars, sizeof *filename);
*filename = (char*)av_malloc_array(num_chars, sizeof *filename);
if (!*filename) {
errno = ENOMEM;
return -1;