problem compiling in slackware 12.0

Support and queries relating to all previous versions of ZoneMinder
Locked
ioane
Posts: 9
Joined: Sat Oct 13, 2007 11:54 pm

problem compiling in slackware 12.0

Post by ioane »

hello everybody

i'm having a problem compiling zoneminder in slackware 12.0, ffmpeg related.

configure runs ok, the problem is at make.
this are the errors:
zm_mpeg.cpp:280: error: cannot convert 'ByteIOContext**' to 'ByteIOContext*' for argument '1' to 'int url_fclose(ByteIOContext*)'
zm_mpeg.cpp: In member function 'double VideoStream::EncodeFrame(uint8_t*, int, bool, unsigned int)':
zm_mpeg.cpp:308: warning: 'img_convert' is deprecated (declared at /usr/local/include/ffmpeg/avcodec.h:2420)
zm_mpeg.cpp:310: warning: 'img_convert' is deprecated (declared at /usr/local/include/ffmpeg/avcodec.h:2420)
make[2]: *** [zm_mpeg.o] Error 1

i modified avcodec.h lines 2413-2422 like this

/**#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
/**
* convert among pixel formats
* @deprecated Use the software scaler (swscale) instead.
*/
/**attribute_deprecated */
int img_convert(AVPicture *dst, int dst_pix_fmt,
const AVPicture *src, int pix_fmt,
int width, int height);
/**#endif*/

and i don't get the error with img_convert, but i don't know how to solve the problem with ByteIOContext


i'm using the last ffmpeg version from svn

any ideas to solve this problem?

thanks
ioane
Posts: 9
Joined: Sat Oct 13, 2007 11:54 pm

solved

Post by ioane »

i solved the problem by using an older version of ffmpeg from the motion project.
it compiled without any problem, and it works :)
SyRenity
Posts: 301
Joined: Mon Jan 24, 2005 2:43 pm

Post by SyRenity »

Or you can edit zm_mpeg.cpp and change the line 290 from url_fclose(&ofc-pb) to url_fclose(ofc-pb).

I think this should be taken into account in the latest ZM.
ioane
Posts: 9
Joined: Sat Oct 13, 2007 11:54 pm

Post by ioane »

thanks
i will try that
Locked