[FFmpeg-cvslog] r23174 - in branches/0.6: . libavutil/avutil.h libavutil/error.c libavutil/error.h
siretart
subversion
Wed May 19 10:03:22 CEST 2010
Author: siretart
Date: Wed May 19 10:03:22 2010
New Revision: 23174
Log:
Make av_strerror() return -1 even in the case when av_strerror_r() is
not defined.
This allows applications to check if av_strerror() cannot provide a
meaningful representation for the provided error code, without having
to actually check the filled string.
backport r23031 by stefano
Modified:
branches/0.6/ (props changed)
branches/0.6/libavutil/avutil.h
branches/0.6/libavutil/error.c
branches/0.6/libavutil/error.h
Modified: branches/0.6/libavutil/avutil.h
==============================================================================
--- branches/0.6/libavutil/avutil.h Wed May 19 10:02:33 2010 (r23173)
+++ branches/0.6/libavutil/avutil.h Wed May 19 10:03:22 2010 (r23174)
@@ -41,7 +41,7 @@
#define LIBAVUTIL_VERSION_MAJOR 50
#define LIBAVUTIL_VERSION_MINOR 15
-#define LIBAVUTIL_VERSION_MICRO 0
+#define LIBAVUTIL_VERSION_MICRO 1
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
Modified: branches/0.6/libavutil/error.c
==============================================================================
--- branches/0.6/libavutil/error.c Wed May 19 10:02:33 2010 (r23173)
+++ branches/0.6/libavutil/error.c Wed May 19 10:03:22 2010 (r23174)
@@ -36,8 +36,10 @@ int av_strerror(int errnum, char *errbuf
} else {
#if HAVE_STRERROR_R
ret = strerror_r(AVUNERROR(errnum), errbuf, errbuf_size);
+#else
+ ret = -1;
#endif
- if (!HAVE_STRERROR_R || ret < 0)
+ if (ret < 0)
snprintf(errbuf, errbuf_size, "Error number %d occurred", errnum);
}
Modified: branches/0.6/libavutil/error.h
==============================================================================
--- branches/0.6/libavutil/error.h Wed May 19 10:02:33 2010 (r23173)
+++ branches/0.6/libavutil/error.h Wed May 19 10:03:22 2010 (r23174)
@@ -64,7 +64,8 @@
* error message indicating the errnum provided to errbuf.
*
* @param errbuf_size the size in bytes of errbuf
- * @return 0 on success, a negative value otherwise
+ * @return 0 on success, a negative value if a description for errnum
+ * cannot be found
*/
int av_strerror(int errnum, char *errbuf, size_t errbuf_size);
More information about the ffmpeg-cvslog
mailing list