diff --git a/vpx/internal/vpx_codec_internal.h b/vpx/internal/vpx_codec_internal.h index dcb451dca17fe055031b5ddfff620c70743f3263..9cde42647df266b80f130c69ee865fe56457b5b0 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 27049a51e0b86d885c21cf280b5f4a3c38d9e484..7b78e5c44a9d24954ce1d35f167041280c206047 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; }