Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

changed: add av_strdup() to exported functions in our avutils loader

  • Loading branch information...
commit 93f657e560241c62006ef78e5d2bdb491f1eebdb 1 parent 52a47b4
@elupus elupus authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/DllAvUtil.h
View
10 lib/DllAvUtil.h
@@ -54,10 +54,16 @@ extern "C" {
#else
#include <ffmpeg/opt.h>
#endif
+ #if defined(HAVE_LIBAVUTIL_MEM_H)
@bootc
bootc added a note

I just tried building XBMC against an out-of-tree ffmpeg and this little segment causes the build to fail. There is no test in the configure script for HAVE_LIBAVUTIL_MEM_H so it always tries to include <ffmpeg/mem.h> which doesn't exist as I have <libavutil/mem.h> instead.

@elupus Collaborator
elupus added a note

can you post a patch or pull request for adding that to configure?

nevermind.. was already fixed in master

@bootc
bootc added a note

Looks like it was done just seconds after I asked: 2e9e0cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ #include <libavutil/mem.h>
+ #else
+ #include <ffmpeg/mem.h>
+ #endif
#else
#include "libavutil/avutil.h"
#include "libavutil/crc.h"
#include "libavutil/opt.h"
+ #include "libavutil/mem.h"
#include "libavutil/fifo.h"
#endif
}
@@ -90,6 +96,7 @@ class DllAvUtilInterface
virtual int av_fifo_size(AVFifoBuffer *f) = 0;
virtual int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int)) = 0;
virtual int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int)) = 0;
+ virtual char *av_strdup(const char *s)=0;
};
#if (defined USE_EXTERNAL_FFMPEG)
@@ -124,6 +131,7 @@ class DllAvUtilBase : public DllDynamic, DllAvUtilInterface
{ return ::av_fifo_generic_read(f, dest, buf_size, func); }
virtual int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int))
{ return ::av_fifo_generic_write(f, src, size, func); }
+ virtual char *av_strdup(const char *s) { return ::av_strdup(s); }
// DLL faking.
virtual bool ResolveExports() { return true; }
@@ -159,6 +167,7 @@ class DllAvUtilBase : public DllDynamic, DllAvUtilInterface
DEFINE_METHOD1(int, av_fifo_size, (AVFifoBuffer *p1))
DEFINE_METHOD4(int, av_fifo_generic_read, (AVFifoBuffer *p1, void *p2, int p3, void (*p4)(void*, void*, int)))
DEFINE_METHOD4(int, av_fifo_generic_write, (AVFifoBuffer *p1, void *p2, int p3, int (*p4)(void*, void*, int)))
+ DEFINE_METHOD1(char*, av_strdup, (const char *p1))
public:
BEGIN_METHOD_RESOLVE()
@@ -179,6 +188,7 @@ class DllAvUtilBase : public DllDynamic, DllAvUtilInterface
RESOLVE_METHOD(av_fifo_size)
RESOLVE_METHOD(av_fifo_generic_read)
RESOLVE_METHOD(av_fifo_generic_write)
+ RESOLVE_METHOD(av_strdup)
END_METHOD_RESOLVE()
};
@bootc

I just tried building XBMC against an out-of-tree ffmpeg and this little segment causes the build to fail. There is no test in the configure script for HAVE_LIBAVUTIL_MEM_H so it always tries to include <ffmpeg/mem.h> which doesn't exist as I have <libavutil/mem.h> instead.

@elupus
Collaborator

can you post a patch or pull request for adding that to configure?

nevermind.. was already fixed in master

@bootc

Looks like it was done just seconds after I asked: 2e9e0cc

Please sign in to comment.
Something went wrong with that request. Please try again.