summaryrefslogtreecommitdiff
path: root/libavcodec/mimic.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-09-16 22:22:27 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-10-04 12:47:34 -0400
commit2cbaa078d18a8cf0ca28e5bb2ee9398a3e08b7b6 (patch)
treed3356bc59e507349d87b2689113abb78e99c2916 /libavcodec/mimic.c
parent26e8895b7395ed180dcb7e30465058c45050b5e2 (diff)
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 <gajjanagadde@gmail.com>
Diffstat (limited to 'libavcodec/mimic.c')
-rw-r--r--libavcodec/mimic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index f5853b5c48..d3f9c0764a 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -167,6 +167,7 @@ static av_cold int mimic_decode_init(AVCodecContext *avctx)
return 0;
}
+#if HAVE_THREADS
static int mimic_decode_update_thread_context(AVCodecContext *avctx, const AVCodecContext *avctx_from)
{
MimicContext *dst = avctx->priv_data, *src = avctx_from->priv_data;
@@ -191,6 +192,7 @@ static int mimic_decode_update_thread_context(AVCodecContext *avctx, const AVCod
return 0;
}
+#endif
static const int8_t vlcdec_lookup[9][64] = {
{ 0, },
@@ -454,6 +456,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
return buf_size;
}
+#if HAVE_THREADS
static av_cold int mimic_init_thread_copy(AVCodecContext *avctx)
{
MimicContext *ctx = avctx->priv_data;
@@ -469,6 +472,7 @@ static av_cold int mimic_init_thread_copy(AVCodecContext *avctx)
return 0;
}
+#endif
AVCodec ff_mimic_decoder = {
.name = "mimic",