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/vp3.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavcodec/vp3.c') diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 09e6f75ec4..1e5547443f 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1930,6 +1930,7 @@ static int ref_frames(Vp3DecodeContext *dst, Vp3DecodeContext *src) return 0; } +#if HAVE_THREADS static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext *src) { Vp3DecodeContext *s = dst->priv_data, *s1 = src->priv_data; @@ -1989,6 +1990,7 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext * return update_frames(dst); } +#endif static int vp3_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, @@ -2221,6 +2223,7 @@ static int read_huffman_tree(AVCodecContext *avctx, GetBitContext *gb) return 0; } +#if HAVE_THREADS static int vp3_init_thread_copy(AVCodecContext *avctx) { Vp3DecodeContext *s = avctx->priv_data; @@ -2237,6 +2240,7 @@ static int vp3_init_thread_copy(AVCodecContext *avctx) return init_frames(s); } +#endif #if CONFIG_THEORA_DECODER static const enum AVPixelFormat theora_pix_fmts[4] = { -- cgit v1.2.3