Page 1 of 1

problem compiling in slackware 12.0

Posted: Sat Nov 24, 2007 10:48 pm
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

solved

Posted: Mon Nov 26, 2007 3:07 am
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 :)

Posted: Mon Nov 26, 2007 9:03 pm
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.

Posted: Tue Nov 27, 2007 12:42 am
by ioane
thanks
i will try that