Files
haikuports/games-emulation/retroarch/patches/retroarch-1.0.0.3_beta.patchset
2015-01-17 19:57:01 +01:00

36 lines
986 B
Plaintext

From 4a135acf9cafd827f1a59ecdf268253848ca80b7 Mon Sep 17 00:00:00 2001
From: Puck Meerburg <puck@puckipedia.nl>
Date: Sat, 17 Jan 2015 18:58:21 +0100
Subject: FFMPEG record driver: Fix Haiku build
diff --git a/record/ffmpeg.c b/record/ffmpeg.c
index f0099e0..6f17aa4 100644
--- a/record/ffmpeg.c
+++ b/record/ffmpeg.c
@@ -27,7 +27,9 @@ extern "C" {
#include <libavutil/avutil.h>
#include <libavutil/avstring.h>
#include <libavutil/opt.h>
+#ifndef __HAIKU__
#include <libavutil/version.h>
+#endif
#include <libavformat/avformat.h>
#ifdef HAVE_AV_CHANNEL_LAYOUT
#include <libavutil/channel_layout.h>
@@ -56,7 +58,10 @@ extern "C" {
#include <time.h>
#endif
-#if LIBAVUTIL_VERSION_INT <= AV_VERSION_INT(52, 9, 0)
+#if defined(__HAIKU__)
+#define av_frame_alloc avcodec_alloc_frame
+#define av_frame_free av_free
+#elif LIBAVUTIL_VERSION_INT <= AV_VERSION_INT(52, 9, 0)
#define av_frame_alloc avcodec_alloc_frame
#define av_frame_free avcodec_free_frame
#endif
--
1.8.3.4