Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
02b2c167
Commit
02b2c167
authored
Aug 13, 2014
by
Jim Bankoski
Committed by
Gerrit Code Review
Aug 13, 2014
Browse files
Merge "vpx_internal_error -> fix -Wunused-function issues"
parents
9f233fc5
a6a997d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
vpx/internal/vpx_codec_internal.h
View file @
02b2c167
...
...
@@ -431,28 +431,10 @@ struct vpx_internal_error_info {
jmp_buf
jmp
;
};
static
void
vpx_internal_error
(
struct
vpx_internal_error_info
*
info
,
vpx_codec_err_t
error
,
const
char
*
fmt
,
...)
{
va_list
ap
;
info
->
error_code
=
error
;
info
->
has_detail
=
0
;
if
(
fmt
)
{
size_t
sz
=
sizeof
(
info
->
detail
);
info
->
has_detail
=
1
;
va_start
(
ap
,
fmt
);
vsnprintf
(
info
->
detail
,
sz
-
1
,
fmt
,
ap
);
va_end
(
ap
);
info
->
detail
[
sz
-
1
]
=
'\0'
;
}
if
(
info
->
setjmp
)
longjmp
(
info
->
jmp
,
info
->
error_code
);
}
void
vpx_internal_error
(
struct
vpx_internal_error_info
*
info
,
vpx_codec_err_t
error
,
const
char
*
fmt
,
...);
#ifdef __cplusplus
}
// extern "C"
...
...
vpx/src/vpx_codec.c
View file @
02b2c167
...
...
@@ -134,3 +134,26 @@ vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx,
return
SAVE_STATUS
(
ctx
,
res
);
}
void
vpx_internal_error
(
struct
vpx_internal_error_info
*
info
,
vpx_codec_err_t
error
,
const
char
*
fmt
,
...)
{
va_list
ap
;
info
->
error_code
=
error
;
info
->
has_detail
=
0
;
if
(
fmt
)
{
size_t
sz
=
sizeof
(
info
->
detail
);
info
->
has_detail
=
1
;
va_start
(
ap
,
fmt
);
vsnprintf
(
info
->
detail
,
sz
-
1
,
fmt
,
ap
);
va_end
(
ap
);
info
->
detail
[
sz
-
1
]
=
'\0'
;
}
if
(
info
->
setjmp
)
longjmp
(
info
->
jmp
,
info
->
error_code
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment