aboutsummaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer2013-03-14 12:02:43 +0100
committerMichael Niedermayer2013-03-14 12:15:02 +0100
commit905e7eb41389e4394e9c6e459b7d1a99dc30b075 (patch)
tree1d182a4e747144648ab74c4a7dfcc88395aa7c29 /libavcodec
parent360d71707f7d3b1c02be857515392a843f159b85 (diff)
parentf099d3d1d5466bd63f4ab36270d169ff9ea613b8 (diff)
Merge commit 'f099d3d1d5466bd63f4ab36270d169ff9ea613b8'
* commit 'f099d3d1d5466bd63f4ab36270d169ff9ea613b8': Add av_log_{ask_for_sample|missing_feature} replacements to libavutil ismindex: Check the return value of allocations Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h6
-rw-r--r--libavcodec/utils.c3
-rw-r--r--libavcodec/version.h3
3 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index a46a8d6cfd..cbb64569c7 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4569,6 +4569,7 @@ void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
*/
unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
+#if FF_API_MISSING_SAMPLE
/**
* Log a generic warning message about a missing feature. This function is
* intended to be used internally by FFmpeg (libavcodec, libavformat, etc.)
@@ -4580,7 +4581,9 @@ unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
* If want_sample is non-zero, additional verbage will be added to the log
* message which tells the user how to report samples to the development
* mailing list.
+ * @deprecated Use avpriv_report_missing_feature() instead.
*/
+attribute_deprecated
void av_log_missing_feature(void *avc, const char *feature, int want_sample);
/**
@@ -4590,8 +4593,11 @@ void av_log_missing_feature(void *avc, const char *feature, int want_sample);
* @param[in] avc a pointer to an arbitrary struct of which the first field is
* a pointer to an AVClass struct
* @param[in] msg string containing an optional message, or NULL if no message
+ * @deprecated Use avpriv_request_sample() instead.
*/
+attribute_deprecated
void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3);
+#endif /* FF_API_MISSING_SAMPLE */
/**
* Register the hardware accelerator hwaccel.
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 46fc71095e..64d2e7e16e 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -45,6 +45,7 @@
#include "frame_thread_encoder.h"
#include "internal.h"
#include "bytestream.h"
+#include "version.h"
#include <stdlib.h>
#include <stdarg.h>
#include <limits.h>
@@ -2859,6 +2860,7 @@ int ff_match_2uint16(const uint16_t(*tab)[2], int size, int a, int b)
return i;
}
+#if FF_API_MISSING_SAMPLE
void av_log_missing_feature(void *avc, const char *feature, int want_sample)
{
av_log(avc, AV_LOG_WARNING, "%s is not implemented. Update your FFmpeg "
@@ -2883,6 +2885,7 @@ void av_log_ask_for_sample(void *avc, const char *msg, ...)
va_end(argument_list);
}
+#endif /* FF_API_MISSING_SAMPLE */
static AVHWAccel *first_hwaccel = NULL;
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 0a2a9094f5..256a2e5500 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -85,5 +85,8 @@
#ifndef FF_API_GET_BUFFER
#define FF_API_GET_BUFFER (LIBAVCODEC_VERSION_MAJOR < 56)
#endif
+#ifndef FF_API_MISSING_SAMPLE
+#define FF_API_MISSING_SAMPLE (LIBAVCODEC_VERSION_MAJOR < 56)
+#endif
#endif /* AVCODEC_VERSION_H */