[FFmpeg-cvslog] r16637 - in trunk/libavcodec: internal.h qcelpdec.c utils.c
benoit
subversion
Fri Jan 16 17:20:42 CET 2009
Author: benoit
Date: Fri Jan 16 17:20:42 2009
New Revision: 16637
Log:
Split ff_log_missing_feature into ff_log_missing_feature
and ff_log_ask_for_sample.
Patch by Kenan Gillet: gmail_adress(author)
Modified:
trunk/libavcodec/internal.h
trunk/libavcodec/qcelpdec.c
trunk/libavcodec/utils.c
Modified: trunk/libavcodec/internal.h
==============================================================================
--- trunk/libavcodec/internal.h Fri Jan 16 16:35:51 2009 (r16636)
+++ trunk/libavcodec/internal.h Fri Jan 16 17:20:42 2009 (r16637)
@@ -36,4 +36,12 @@
*/
void ff_log_missing_feature(void *avc, const char *feature, int want_sample);
+/**
+ * Logs a generic warning message asking for a 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
+ */
+void ff_log_ask_for_sample(void *avc, const char *msg);
+
#endif /* AVCODEC_INTERNAL_H */
Modified: trunk/libavcodec/qcelpdec.c
==============================================================================
--- trunk/libavcodec/qcelpdec.c Fri Jan 16 16:35:51 2009 (r16636)
+++ trunk/libavcodec/qcelpdec.c Fri Jan 16 17:20:42 2009 (r16637)
@@ -680,10 +680,7 @@ static qcelp_packet_rate determine_bitra
if(bitrate == SILENCE)
{
//FIXME: Remove experimental warning when tested with samples.
- av_log(avctx, AV_LOG_WARNING, "'Blank frame handling is experimental."
- " 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");
+ ff_log_ask_for_sample(avctx, "'Blank frame handling is experimental.");
}
return bitrate;
}
Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c Fri Jan 16 16:35:51 2009 (r16636)
+++ trunk/libavcodec/utils.c Fri Jan 16 17:20:42 2009 (r16637)
@@ -36,6 +36,7 @@
#include "opt.h"
#include "imgconvert.h"
#include "audioconvert.h"
+#include "internal.h"
#include <stdlib.h>
#include <stdarg.h>
#include <limits.h>
@@ -1089,8 +1090,16 @@ void ff_log_missing_feature(void *avc, c
"occurs, it means that your file has a feature which has not "
"been implemented.", feature);
if(want_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.");
- av_log(avc, AV_LOG_WARNING, "\n");
+ ff_log_ask_for_sample(avc, NULL);
+ else
+ av_log(avc, AV_LOG_WARNING, "\n");
+}
+
+void ff_log_ask_for_sample(void *avc, const char *msg)
+{
+ if (msg)
+ av_log(avc, AV_LOG_WARNING, "%s ", msg);
+ 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");
}
More information about the ffmpeg-cvslog
mailing list