This silences a bunch of warnings with threads disabled.
---
 libavcodec/exr.c           | 2 ++
 libavcodec/h264dec.c       | 2 ++
 libavcodec/huffyuvdec.c    | 2 ++
 libavcodec/mdec.c          | 2 ++
 libavcodec/mimic.c         | 2 ++
 libavcodec/mpeg12dec.c     | 2 ++
 libavcodec/mpeg4videodec.c | 2 ++
 libavcodec/vp3.c           | 4 ++++
 libavcodec/vp8.c           | 2 ++
 9 files changed, 20 insertions(+)

diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 28cee84..553be43 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1389,6 +1389,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
     return 0;
 }
 
+#if HAVE_THREADS
 static int decode_init_thread_copy(AVCodecContext *avctx)
 {    EXRContext *s = avctx->priv_data;
 
@@ -1399,6 +1400,7 @@ static int decode_init_thread_copy(AVCodecContext *avctx)
 
     return 0;
 }
+#endif /* HAVE_THREADS */
 
 static av_cold int decode_end(AVCodecContext *avctx)
 {
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index fc32790..874b445 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -408,6 +408,7 @@ static av_cold int h264_decode_init(AVCodecContext *avctx)
     return 0;
 }
 
+#if HAVE_THREADS
 static int decode_init_thread_copy(AVCodecContext *avctx)
 {
     H264Context *h = avctx->priv_data;
@@ -426,6 +427,7 @@ static int decode_init_thread_copy(AVCodecContext *avctx)
 
     return 0;
 }
+#endif /* HAVE_THREADS */
 
 /**
  * instantaneous decoder refresh.
diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index 12eca26..a5921cd 100644
--- a/libavcodec/huffyuvdec.c
+++ b/libavcodec/huffyuvdec.c
@@ -354,6 +354,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
     return 0;
 }
 
+#if HAVE_THREADS
 static av_cold int decode_init_thread_copy(AVCodecContext *avctx)
 {
     HYuvContext *s = avctx->priv_data;
@@ -376,6 +377,7 @@ static av_cold int decode_init_thread_copy(AVCodecContext 
*avctx)
 
     return 0;
 }
+#endif /* HAVE_THREADS */
 
 /* TODO instead of restarting the read when the code isn't in the first level
  * of the joint table, jump into the 2nd level of the individual table. */
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index c0db368..989aec4 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -234,6 +234,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
     return 0;
 }
 
+#if HAVE_THREADS
 static av_cold int decode_init_thread_copy(AVCodecContext *avctx)
 {
     MDECContext * const a = avctx->priv_data;
@@ -242,6 +243,7 @@ static av_cold int decode_init_thread_copy(AVCodecContext 
*avctx)
 
     return 0;
 }
+#endif /* HAVE_THREADS */
 
 static av_cold int decode_end(AVCodecContext *avctx)
 {
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 31d07ec..b0e3411 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -448,6 +448,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;
@@ -463,6 +464,7 @@ static av_cold int mimic_init_thread_copy(AVCodecContext 
*avctx)
 
     return 0;
 }
+#endif /* HAVE_THREADS */
 
 AVCodec ff_mimic_decoder = {
     .name                  = "mimic",
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 5158980..1424050 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1065,6 +1065,7 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx)
     return 0;
 }
 
+#if HAVE_THREADS
 static int mpeg_decode_update_thread_context(AVCodecContext *avctx,
                                              const AVCodecContext *avctx_from)
 {
@@ -1092,6 +1093,7 @@ static int 
mpeg_decode_update_thread_context(AVCodecContext *avctx,
 
     return 0;
 }
+#endif /* HAVE_THREADS */
 
 static void quant_matrix_rebuild(uint16_t *matrix, const uint8_t *old_perm,
                                  const uint8_t *new_perm)
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 8891ec1..abb8fad 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -2538,6 +2538,7 @@ int ff_mpeg4_frame_end(AVCodecContext *avctx, const 
uint8_t *buf, int buf_size)
     return 0;
 }
 
+#if HAVE_THREADS
 static int mpeg4_update_thread_context(AVCodecContext *dst,
                                        const AVCodecContext *src)
 {
@@ -2559,6 +2560,7 @@ static int mpeg4_update_thread_context(AVCodecContext 
*dst,
 
     return 0;
 }
+#endif /* HAVE_THREADS */
 
 static av_cold int decode_init(AVCodecContext *avctx)
 {
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index a2dd390..cd26edb 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1921,6 +1921,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;
@@ -1978,6 +1979,7 @@ static int vp3_update_thread_context(AVCodecContext *dst, 
const AVCodecContext *
 
     return update_frames(dst);
 }
+#endif /* HAVE_THREADS */
 
 static int vp3_decode_frame(AVCodecContext *avctx,
                             void *data, int *got_frame,
@@ -2182,6 +2184,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;
@@ -2198,6 +2201,7 @@ static int vp3_init_thread_copy(AVCodecContext *avctx)
 
     return init_frames(s);
 }
+#endif /* HAVE_THREADS */
 
 #if CONFIG_THEORA_DECODER
 static const enum AVPixelFormat theora_pix_fmts[4] = {
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 94df580..4914687 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -2771,6 +2771,7 @@ av_cold int ff_vp8_decode_init(AVCodecContext *avctx)
 }
 
 #if CONFIG_VP8_DECODER
+#if HAVE_THREADS
 static av_cold int vp8_decode_init_thread_copy(AVCodecContext *avctx)
 {
     VP8Context *s = avctx->priv_data;
@@ -2821,6 +2822,7 @@ static int 
vp8_decode_update_thread_context(AVCodecContext *dst,
 
     return 0;
 }
+#endif /* HAVE_THREADS */
 #endif /* CONFIG_VP8_DECODER */
 
 #if CONFIG_VP7_DECODER
-- 
2.1.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to