| Index: source/libvpx/vpx/src/vpx_decoder.c
|
| ===================================================================
|
| --- source/libvpx/vpx/src/vpx_decoder.c (revision 291857)
|
| +++ source/libvpx/vpx/src/vpx_decoder.c (working copy)
|
| @@ -18,9 +18,13 @@
|
|
|
| #define SAVE_STATUS(ctx,var) (ctx?(ctx->err = var):var)
|
|
|
| +static vpx_codec_alg_priv_t *get_alg_priv(vpx_codec_ctx_t *ctx) {
|
| + return (vpx_codec_alg_priv_t *)ctx->priv;
|
| +}
|
| +
|
| vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx,
|
| vpx_codec_iface_t *iface,
|
| - vpx_codec_dec_cfg_t *cfg,
|
| + const vpx_codec_dec_cfg_t *cfg,
|
| vpx_codec_flags_t flags,
|
| int ver) {
|
| vpx_codec_err_t res;
|
| @@ -94,7 +98,7 @@
|
| si->w = 0;
|
| si->h = 0;
|
|
|
| - res = ctx->iface->dec.get_si(ctx->priv->alg_priv, si);
|
| + res = ctx->iface->dec.get_si(get_alg_priv(ctx), si);
|
| }
|
|
|
| return SAVE_STATUS(ctx, res);
|
| @@ -115,8 +119,8 @@
|
| else if (!ctx->iface || !ctx->priv)
|
| res = VPX_CODEC_ERROR;
|
| else {
|
| - res = ctx->iface->dec.decode(ctx->priv->alg_priv, data, data_sz,
|
| - user_priv, deadline);
|
| + res = ctx->iface->dec.decode(get_alg_priv(ctx), data, data_sz, user_priv,
|
| + deadline);
|
| }
|
|
|
| return SAVE_STATUS(ctx, res);
|
| @@ -129,7 +133,7 @@
|
| if (!ctx || !iter || !ctx->iface || !ctx->priv)
|
| img = NULL;
|
| else
|
| - img = ctx->iface->dec.get_frame(ctx->priv->alg_priv, iter);
|
| + img = ctx->iface->dec.get_frame(get_alg_priv(ctx), iter);
|
|
|
| return img;
|
| }
|
| @@ -185,7 +189,7 @@
|
| !(ctx->iface->caps & VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER)) {
|
| res = VPX_CODEC_ERROR;
|
| } else {
|
| - res = ctx->iface->dec.set_fb_fn(ctx->priv->alg_priv, cb_get, cb_release,
|
| + res = ctx->iface->dec.set_fb_fn(get_alg_priv(ctx), cb_get, cb_release,
|
| cb_priv);
|
| }
|
|
|
|
|