Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 9b120c7f3c88d74efedd7f0839b10ed1 > files > 15

xbmc-12.3-1.1.mga4.src.rpm

From c20e395e573eb614e91913cbcac648c50eb43d43 Mon Sep 17 00:00:00 2001
From: Alexis Ballier <aballier@gentoo.org>
Date: Thu, 25 Apr 2013 11:11:02 +0200
Subject: [PATCH 3/4] DllAvCodec: map avcodec_free_frame.

This makes xbmc require FFmpeg 1.0
---
 lib/DllAvCodec.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/DllAvCodec.h b/lib/DllAvCodec.h
index 6b2b806..96bd68d 100644
--- a/lib/DllAvCodec.h
+++ b/lib/DllAvCodec.h
@@ -113,6 +113,7 @@ public:
   virtual int av_dup_packet(AVPacket *pkt)=0;
   virtual void av_init_packet(AVPacket *pkt)=0;
   virtual int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align) = 0;
+  virtual void avcodec_free_frame(AVFrame **frame)=0;
 };
 
 #if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
@@ -183,6 +184,7 @@ public:
   virtual int av_dup_packet(AVPacket *pkt) { return ::av_dup_packet(pkt); }
   virtual void av_init_packet(AVPacket *pkt) { return ::av_init_packet(pkt); }
   virtual int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align) { return ::avcodec_fill_audio_frame(frame, nb_channels, sample_fmt, buf, buf_size, align); }
+  virtual void avcodec_free_frame(AVFrame **frame) { return ::avcodec_free_frame(frame); };
 
   // DLL faking.
   virtual bool ResolveExports() { return true; }
@@ -233,6 +235,7 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface
   DEFINE_METHOD2(void, avcodec_default_release_buffer, (AVCodecContext *p1, AVFrame *p2))
   DEFINE_METHOD2(enum PixelFormat, avcodec_default_get_format, (struct AVCodecContext *p1, const enum PixelFormat *p2))
   DEFINE_METHOD6(int, avcodec_fill_audio_frame, (AVFrame* p1, int p2, enum AVSampleFormat p3, const uint8_t* p4, int p5, int p6))
+  DEFINE_METHOD1(void, avcodec_free_frame, (AVFrame **p1))
 
   DEFINE_METHOD1(AVCodec*, av_codec_next, (AVCodec *p1))
   BEGIN_METHOD_RESOLVE()
@@ -269,6 +272,7 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface
     RESOLVE_METHOD(av_dup_packet)
     RESOLVE_METHOD(av_init_packet)
     RESOLVE_METHOD(avcodec_fill_audio_frame)
+    RESOLVE_METHOD(avcodec_free_frame)
   END_METHOD_RESOLVE()
 
   /* dependencies of libavcodec */
-- 
1.8.1.5