| FFmpeg :: make: *** [libavcodec/imgresample.o] Error 1 | |||||||||||||
If you get the following error message when trying to compile ffmpeg: [exec] make: *** [libavcodec/imgresample.o] Error 1 You need to apply the following patch to compile ffmpeg successfully.
Use your favorite Linux text editor, such as vi or pico, to create the following file:
Insert the following text and then save the file:
Index: libavcodec/imgresample.c
===================================================================
--- libavcodec/imgresample.c (revision 16975)
+++ libavcodec/imgresample.c (working copy)
@@ -517,10 +517,10 @@
static const AVClass context_class = { "imgresample", context_to_name, NULL };
-struct SwsContext *sws_getContext(int srcW, int srcH, int srcFormat,
- int dstW, int dstH, int dstFormat,
+struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat,
+ int dstW, int dstH, enum PixelFormat dstFormat,
int flags, SwsFilter *srcFilter,
- SwsFilter *dstFilter, double *param)
+ SwsFilter *dstFilter, const double *param)
{
struct SwsContext *ctx;
@@ -575,9 +575,10 @@
* asumed to remain valid.
*/
struct SwsContext *sws_getCachedContext(struct SwsContext *ctx,
- int srcW, int srcH, int srcFormat,
- int dstW, int dstH, int dstFormat, int flags,
- SwsFilter *srcFilter, SwsFilter *dstFilter, double *param)
+ int srcW, int srcH, enum PixelFormat srcFormat,
+ int dstW, int dstH, enum PixelFormat dstFormat,
+ int flags, SwsFilter *srcFilter,
+ SwsFilter *dstFilter, const double *param)
{
if (ctx != NULL) {
if ((ctx->resampling_ctx->iwidth != srcW) ||
Then run the following command to apply the patch:
If you get the following error message even after applying the patch given above:
libavcodec/i386/mmx.h:24:2: warning: #warning Everything in this header is deprecated, use plain asm()! New code using this header will be rejected.According to ffmpeg-php.sourceforge.net: ffmpeg-php is not compatible with ffmpeg's swscaler. Enabling swscaler in ffmpeg disables the img_convert functions that ffmpeg-php needs to do its thing. Ffmpeg must be configured and compiled without the '--enable-swscale' flag.It is unfortunate that FFmpeg's swscaler is enabled by default. Try the following solution:
From: int sws_scale(struct SwsContext *context, const uint8_t* const srcSlice[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t* const dst[], const int dstStride[]); To: #int sws_scale(struct SwsContext *context, const uint8_t* const srcSlice[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t* const dst[], const int dstStride[]); Then run the command /bin/make again to re-compile FFmpeg. If none of the above solutions worked, and you are one of our clients, submit a ticket using our Help Desk and we will finish the installation of FFmpeg and FFmpeg-Php FREE of charge. If you are not one of our clients, submit an order for the xPress Plan and we will finish the installation of FFmpeg and FFmpeg-Php on your server /VPS |
|||||||||||||

