From 72ebafff515b70c55a234055dfc501acc3866f97 Mon Sep 17 00:00:00 2001 From: Gaute Strokkenes Date: Wed, 2 Feb 2011 15:22:51 +0000 Subject: [PATCH] Avoid using an anonymous union. Change-Id: I5744269a35e2d696ecf40c1665efd572bfc9b6cb --- vpx/internal/vpx_codec_internal.h | 2 +- vpx/src/vpx_decoder.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vpx/internal/vpx_codec_internal.h b/vpx/internal/vpx_codec_internal.h index dcb451dca..9cde42647 100644 --- a/vpx/internal/vpx_codec_internal.h +++ b/vpx/internal/vpx_codec_internal.h @@ -321,7 +321,7 @@ typedef struct vpx_codec_priv_cb_pair { vpx_codec_put_frame_cb_fn_t put_frame; vpx_codec_put_slice_cb_fn_t put_slice; - }; + } u; void *user_priv; } vpx_codec_priv_cb_pair_t; diff --git a/vpx/src/vpx_decoder.c b/vpx/src/vpx_decoder.c index 27049a51e..7b78e5c44 100644 --- a/vpx/src/vpx_decoder.c +++ b/vpx/src/vpx_decoder.c @@ -160,7 +160,7 @@ vpx_codec_err_t vpx_codec_register_put_frame_cb(vpx_codec_ctx_t *ctx res = VPX_CODEC_ERROR; else { - ctx->priv->dec.put_frame_cb.put_frame = cb; + ctx->priv->dec.put_frame_cb.u.put_frame = cb; ctx->priv->dec.put_frame_cb.user_priv = user_priv; res = VPX_CODEC_OK; } @@ -182,7 +182,7 @@ vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx res = VPX_CODEC_ERROR; else { - ctx->priv->dec.put_slice_cb.put_slice = cb; + ctx->priv->dec.put_slice_cb.u.put_slice = cb; ctx->priv->dec.put_slice_cb.user_priv = user_priv; res = VPX_CODEC_OK; } -- 2.40.0