Browse Source

libobs/media-io: Fix link error including a header file from C++

Norihiro Kamae 2 years ago
parent
commit
16fed06927
1 changed files with 8 additions and 0 deletions
  1. 8 0
      libobs/media-io/video-frame.h

+ 8 - 0
libobs/media-io/video-frame.h

@@ -20,6 +20,10 @@
 #include "../util/bmem.h"
 #include "video-io.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct video_frame {
 	uint8_t *data[MAX_AV_PLANES];
 	uint32_t linesize[MAX_AV_PLANES];
@@ -58,3 +62,7 @@ static inline void video_frame_destroy(struct video_frame *frame)
 EXPORT void video_frame_copy(struct video_frame *dst,
 			     const struct video_frame *src,
 			     enum video_format format, uint32_t height);
+
+#ifdef __cplusplus
+}
+#endif