summaryrefslogtreecommitdiff
path: root/libavcodec/libopenh264enc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-01-08 00:03:36 +0200
committerMartin Storsjö <martin@martin.st>2015-01-20 15:02:50 +0100
commit440119b18836887d98c9e337c5911563bb43588c (patch)
treee2faa0e713374d2781d70ae93f40ec0088b211a5 /libavcodec/libopenh264enc.c
parentbba02479260d0e7dec8c530a7e75a1c7aa53c06e (diff)
libopenh264enc: Move a declaration of a variable into an ifdef
This avoids needing an attribute for silencing warnings about it being unused. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/libopenh264enc.c')
-rw-r--r--libavcodec/libopenh264enc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index 2781ab170a..57343ce8f6 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -69,13 +69,12 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
SVCContext *s = avctx->priv_data;
SEncParamExt param = { 0 };
int err = AVERROR_UNKNOWN;
- av_unused OpenH264Version libver;
// Mingw GCC < 4.7 on x86_32 uses an incorrect/buggy ABI for the WelsGetCodecVersion
// function (for functions returning larger structs), thus skip the check in those
// configurations.
#if !defined(_WIN32) || !defined(__GNUC__) || !ARCH_X86_32 || AV_GCC_VERSION_AT_LEAST(4, 7)
- libver = WelsGetCodecVersion();
+ OpenH264Version libver = WelsGetCodecVersion();
if (memcmp(&libver, &g_stCodecVersion, sizeof(libver))) {
av_log(avctx, AV_LOG_ERROR, "Incorrect library version loaded\n");
return AVERROR(EINVAL);