diff options
author | Kenan Gillet <kenan.gillet@gmail.com> | 2009-01-16 16:20:42 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2009-01-16 16:20:42 +0000 |
commit | 0ba39dd1a9ec8ee0fd798ba6daf90d0cc36e17f2 (patch) | |
tree | 313476bb4a48d6115bbf883a87da59c25e17b0a2 /libavcodec | |
parent | 0e7ceb2442f07edefc2357e3ed14d208652a99f3 (diff) | |
download | ffmpeg-streaming-0ba39dd1a9ec8ee0fd798ba6daf90d0cc36e17f2.zip ffmpeg-streaming-0ba39dd1a9ec8ee0fd798ba6daf90d0cc36e17f2.tar.gz |
Split ff_log_missing_feature into ff_log_missing_feature
and ff_log_ask_for_sample.
Patch by Kenan Gillet: gmail_adress(author)
Originally committed as revision 16637 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/internal.h | 8 | ||||
-rw-r--r-- | libavcodec/qcelpdec.c | 5 | ||||
-rw-r--r-- | libavcodec/utils.c | 17 |
3 files changed, 22 insertions, 8 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h index ec954a4..9a5d5fd 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -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 */ diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c index c65b094..56551fd 100644 --- a/libavcodec/qcelpdec.c +++ b/libavcodec/qcelpdec.c @@ -680,10 +680,7 @@ static qcelp_packet_rate determine_bitrate(AVCodecContext *avctx, const int buf_ 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; } diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 7830deb..0a3773e 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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, const char *feature, int want_sample) "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"); } |