[osg-users] ffmpeg plugin on OS X / DarwinPorts

Robert Osfield robert.osfield at gmail.com
Wed Mar 4 00:54:30 PST 2009

Hi Ulrich,

On Wed, Mar 4, 2009 at 7:59 AM, Ulrich Hertlein <u.hertlein at sandbox.de> wrote:
> The header file contains
> #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
> attribute_deprecated int img_convert(AVPicture *dst, int dst_pix_fmt,
>                const AVPicture *src, int pix_fmt,
>                int width, int height);
> #endif
> I believe the '_' prefix is added to all exported functions in a library, it
> certainly looks that way.
> It seems like 'img_convert' (and img_resample and others which also are in a
> similar #if LAVC_VERSION_INT block) is just not in libavcodec... I'm
> investigating that.

Curious the svn version of ffmpeg has img_convert built in, but not
declared in any way in the headers, so to get it to work I had to add

extern "C"
    int img_convert(AVPicture *dst, int dst_pix_fmt, const AVPicture *src,
                int src_pix_fmt, int src_width, int src_height);


To our src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp file.  This got
things building on later svn rev's of ffmpeg.   You build of ffmpeg
seems to be different in some way.  You could try #if defing out the
above and see what happens.


More information about the osg-users mailing list