This avoids needing an attribute for silencing warnings about
it being unused.
---
libavcodec/libopenh264enc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index 4110426..6c80f41 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -69,19 +69,18 @@ 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;
- (void)g_strCodecVer; // Avoid warnings due to unused static members from
codec_ver.h
// 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);
}
#endif
+ (void)g_strCodecVer; // Avoid warnings due to unused static members from
codec_ver.h
if (WelsCreateSVCEncoder(&s->encoder)) {
av_log(avctx, AV_LOG_ERROR, "Unable to create encoder\n");
--
1.9.3 (Apple Git-50)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel