From 2cbaa078d18a8cf0ca28e5bb2ee9398a3e08b7b6 Mon Sep 17 00:00:00 2001 From: Ganesh Ajjanagadde Date: Wed, 16 Sep 2015 22:22:27 -0400 Subject: avcodec: use HAVE_THREADS header guards to silence -Wunused-function When compiled with --disable-pthreads, e.g http://fate.ffmpeg.org/report.cgi?time=20150917015044&slot=alpha-debian-qemu-gcc-4.7, a bunch of -Wunused-functions are reported due to missing header guards around threading related functions. This patch should silence such warnings. Signed-off-by: Ganesh Ajjanagadde --- libavcodec/ffv1dec.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavcodec/ffv1dec.c') diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 662ef13fff..a8d5e33da9 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -1017,6 +1017,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac return buf_size; } +#if HAVE_THREADS static int init_thread_copy(AVCodecContext *avctx) { FFV1Context *f = avctx->priv_data; @@ -1042,6 +1043,7 @@ static int init_thread_copy(AVCodecContext *avctx) return 0; } +#endif static void copy_fields(FFV1Context *fsdst, FFV1Context *fssrc, FFV1Context *fsrc) { @@ -1071,6 +1073,7 @@ static void copy_fields(FFV1Context *fsdst, FFV1Context *fssrc, FFV1Context *fsr } } +#if HAVE_THREADS static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) { FFV1Context *fsrc = src->priv_data; @@ -1114,6 +1117,7 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) return 0; } +#endif AVCodec ff_ffv1_decoder = { .name = "ffv1", -- cgit v1.2.1