summaryrefslogtreecommitdiff
path: root/libavutil/error.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-06-10 00:17:45 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-06-11 23:57:01 +0200
commit359abb18cfe3a5e6db44031c5110322343b16756 (patch)
tree7e3a8ce665fc918532ad27d02958c1e526ef1752 /libavutil/error.c
parent5683de00e99e4be87419a97d521887f94acc937a (diff)
downloadffmpeg-359abb18cfe3a5e6db44031c5110322343b16756.tar.gz
lavu/error: add av_make_error_string() and av_err2str() convenience utilities
These functions are modeled after the corresponding utilities in libavutil/timestamp.h.
Diffstat (limited to 'libavutil/error.c')
-rw-r--r--libavutil/error.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavutil/error.c b/libavutil/error.c
index 0a3b4bfafd..cd31e66340 100644
--- a/libavutil/error.c
+++ b/libavutil/error.c
@@ -79,17 +79,14 @@ int av_strerror(int errnum, char *errbuf, size_t errbuf_size)
int main(void)
{
int i;
- char errbuf[256];
for (i = 0; i < FF_ARRAY_ELEMS(error_entries); i++) {
struct error_entry *entry = &error_entries[i];
- av_strerror(entry->num, errbuf, sizeof(errbuf));
- printf("%d: %s [%s]\n", entry->num, errbuf, entry->tag);
+ printf("%d: %s [%s]\n", entry->num, av_err2str(entry->num), entry->tag);
}
for (i = 0; i < 256; i++) {
- av_strerror(-i, errbuf, sizeof(errbuf));
- printf("%d: %s\n", -i, errbuf);
+ printf("%d: %s\n", -i, av_err2str(-i));
}
return 0;