Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1338)

Side by Side Diff: source/libvpx/vpx/src/vpx_codec.c

Issue 554673004: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vpx/src/svc_encodeframe.c ('k') | source/libvpx/vpx/src/vpx_decoder.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 82
83 vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx) { 83 vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx) {
84 vpx_codec_err_t res; 84 vpx_codec_err_t res;
85 85
86 if (!ctx) 86 if (!ctx)
87 res = VPX_CODEC_INVALID_PARAM; 87 res = VPX_CODEC_INVALID_PARAM;
88 else if (!ctx->iface || !ctx->priv) 88 else if (!ctx->iface || !ctx->priv)
89 res = VPX_CODEC_ERROR; 89 res = VPX_CODEC_ERROR;
90 else { 90 else {
91 if (ctx->priv->alg_priv) 91 ctx->iface->destroy((vpx_codec_alg_priv_t *)ctx->priv);
92 ctx->iface->destroy(ctx->priv->alg_priv);
93 92
94 ctx->iface = NULL; 93 ctx->iface = NULL;
95 ctx->name = NULL; 94 ctx->name = NULL;
96 ctx->priv = NULL; 95 ctx->priv = NULL;
97 res = VPX_CODEC_OK; 96 res = VPX_CODEC_OK;
98 } 97 }
99 98
100 return SAVE_STATUS(ctx, res); 99 return SAVE_STATUS(ctx, res);
101 } 100 }
102 101
(...skipping 15 matching lines...) Expand all
118 else { 117 else {
119 vpx_codec_ctrl_fn_map_t *entry; 118 vpx_codec_ctrl_fn_map_t *entry;
120 119
121 res = VPX_CODEC_ERROR; 120 res = VPX_CODEC_ERROR;
122 121
123 for (entry = ctx->iface->ctrl_maps; entry && entry->fn; entry++) { 122 for (entry = ctx->iface->ctrl_maps; entry && entry->fn; entry++) {
124 if (!entry->ctrl_id || entry->ctrl_id == ctrl_id) { 123 if (!entry->ctrl_id || entry->ctrl_id == ctrl_id) {
125 va_list ap; 124 va_list ap;
126 125
127 va_start(ap, ctrl_id); 126 va_start(ap, ctrl_id);
128 res = entry->fn(ctx->priv->alg_priv, ap); 127 res = entry->fn((vpx_codec_alg_priv_t *)ctx->priv, ap);
129 va_end(ap); 128 va_end(ap);
130 break; 129 break;
131 } 130 }
132 } 131 }
133 } 132 }
134 133
135 return SAVE_STATUS(ctx, res); 134 return SAVE_STATUS(ctx, res);
136 } 135 }
137 136
138 void vpx_internal_error(struct vpx_internal_error_info *info, 137 void vpx_internal_error(struct vpx_internal_error_info *info,
(...skipping 11 matching lines...) Expand all
150 info->has_detail = 1; 149 info->has_detail = 1;
151 va_start(ap, fmt); 150 va_start(ap, fmt);
152 vsnprintf(info->detail, sz - 1, fmt, ap); 151 vsnprintf(info->detail, sz - 1, fmt, ap);
153 va_end(ap); 152 va_end(ap);
154 info->detail[sz - 1] = '\0'; 153 info->detail[sz - 1] = '\0';
155 } 154 }
156 155
157 if (info->setjmp) 156 if (info->setjmp)
158 longjmp(info->jmp, info->error_code); 157 longjmp(info->jmp, info->error_code);
159 } 158 }
OLDNEW
« no previous file with comments | « source/libvpx/vpx/src/svc_encodeframe.c ('k') | source/libvpx/vpx/src/vpx_decoder.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698