summaryrefslogtreecommitdiffstats
path: root/libavutil/log.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-14 12:02:43 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-14 12:15:02 +0100
commit905e7eb41389e4394e9c6e459b7d1a99dc30b075 (patch)
tree1d182a4e747144648ab74c4a7dfcc88395aa7c29 /libavutil/log.c
parent360d71707f7d3b1c02be857515392a843f159b85 (diff)
parentf099d3d1d5466bd63f4ab36270d169ff9ea613b8 (diff)
downloadffmpeg-streaming-905e7eb41389e4394e9c6e459b7d1a99dc30b075.zip
ffmpeg-streaming-905e7eb41389e4394e9c6e459b7d1a99dc30b075.tar.gz
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 'libavutil/log.c')
-rw-r--r--libavutil/log.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index 700e89f..a274134 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -32,9 +32,11 @@
#if HAVE_IO_H
#include <io.h>
#endif
+#include <stdarg.h>
#include <stdlib.h>
#include "avutil.h"
#include "common.h"
+#include "internal.h"
#include "log.h"
#define LINE_SZ 1024
@@ -278,3 +280,40 @@ void av_log_set_callback(void (*callback)(void*, int, const char*, va_list))
{
av_log_callback = callback;
}
+
+static void missing_feature_sample(int sample, void *avc, const char *msg, ...)
+{
+ va_list argument_list;
+
+ va_start(argument_list, msg);
+
+ av_vlog(avc, AV_LOG_WARNING, msg, argument_list);
+ av_log(avc, AV_LOG_WARNING, " is not implemented. Update your FFmpeg "
+ "version to the newest one from Git. If the problem still "
+ "occurs, it means that your file has a feature which has not "
+ "been implemented.\n");
+ if (sample)
+ av_log(avc, AV_LOG_WARNING, "If you want to help, upload a sample "
+ "of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ "
+ "and contact the ffmpeg-devel mailing list.\n");
+
+ va_end(argument_list);
+}
+
+void avpriv_request_sample(void *avc, const char *msg, ...)
+{
+ va_list argument_list;
+
+ va_start(argument_list, msg);
+ missing_feature_sample(1, avc, msg, argument_list);
+ va_end(argument_list);
+}
+
+void avpriv_report_missing_feature(void *avc, const char *msg, ...)
+{
+ va_list argument_list;
+
+ va_start(argument_list, msg);
+ missing_feature_sample(0, avc, msg, argument_list);
+ va_end(argument_list);
+}
OpenPOWER on IntegriCloud