OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 ctx->name = iface->name; | 47 ctx->name = iface->name; |
48 ctx->priv = NULL; | 48 ctx->priv = NULL; |
49 ctx->init_flags = flags; | 49 ctx->init_flags = flags; |
50 ctx->config.dec = cfg; | 50 ctx->config.dec = cfg; |
51 | 51 |
52 res = ctx->iface->init(ctx, NULL); | 52 res = ctx->iface->init(ctx, NULL); |
53 if (res) { | 53 if (res) { |
54 ctx->err_detail = ctx->priv ? ctx->priv->err_detail : NULL; | 54 ctx->err_detail = ctx->priv ? ctx->priv->err_detail : NULL; |
55 vpx_codec_destroy(ctx); | 55 vpx_codec_destroy(ctx); |
56 } | 56 } |
57 | |
58 if (ctx->priv) | |
59 ctx->priv->iface = ctx->iface; | |
60 } | 57 } |
61 | 58 |
62 return SAVE_STATUS(ctx, res); | 59 return SAVE_STATUS(ctx, res); |
63 } | 60 } |
64 | 61 |
65 | 62 |
66 vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface, | 63 vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface, |
67 const uint8_t *data, | 64 const uint8_t *data, |
68 unsigned int data_sz, | 65 unsigned int data_sz, |
69 vpx_codec_stream_info_t *si) { | 66 vpx_codec_stream_info_t *si) { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 } else if (!ctx->iface || !ctx->priv || | 184 } else if (!ctx->iface || !ctx->priv || |
188 !(ctx->iface->caps & VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER)) { | 185 !(ctx->iface->caps & VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER)) { |
189 res = VPX_CODEC_ERROR; | 186 res = VPX_CODEC_ERROR; |
190 } else { | 187 } else { |
191 res = ctx->iface->dec.set_fb_fn(ctx->priv->alg_priv, cb_get, cb_release, | 188 res = ctx->iface->dec.set_fb_fn(ctx->priv->alg_priv, cb_get, cb_release, |
192 cb_priv); | 189 cb_priv); |
193 } | 190 } |
194 | 191 |
195 return SAVE_STATUS(ctx, res); | 192 return SAVE_STATUS(ctx, res); |
196 } | 193 } |
OLD | NEW |