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>
release/5.1
Andreas Rheinhardt 3 years ago
parent c471cc7474
commit 4454142782
  1. 2
      libavutil/wchar_filename.h

@ -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;

Loading…
Cancel
Save