From 1939b9030642106a5f75d7d2cfd1ec5208bea0ab Mon Sep 17 00:00:00 2001 From: Davinder Singh Date: Thu, 10 Aug 2017 07:08:34 +0530 Subject: [PATCH] avcodec/mjpegenc: disable unused code with AMV disable unused amv_encode_picture() when AMV encoder is not configured. Signed-off-by: Michael Niedermayer --- libavcodec/mjpegenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index ee77cde8cb..9c3f863f6c 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -346,6 +346,7 @@ void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]) } } +#if CONFIG_AMV_ENCODER // maximum over s->mjpeg_vsample[i] #define V_MAX 2 static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, @@ -387,6 +388,7 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, av_frame_free(&pic); return ret; } +#endif #define OFFSET(x) offsetof(MpegEncContext, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM