diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index d1377ca0f83760a12d1c7c327d335cc1e10ea82c..14f00bb5d04322dcc8554038771c71b44f339613 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -4116,7 +4116,7 @@ void av_log_missing_feature(void *avc, const char *feature, int want_sample); * a pointer to an AVClass struct * @param[in] msg string containing an optional message, or NULL if no message */ -void av_log_ask_for_sample(void *avc, const char *msg); +void av_log_ask_for_sample(void *avc, const char *msg, ...); /** * Register the hardware accelerator hwaccel. diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 744e0ada874b485c26e1decf8125572fdf5cfa01..d60e236952737f34a4df9c09422a8138454e24f5 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1133,13 +1133,19 @@ void av_log_missing_feature(void *avc, const char *feature, int want_sample) av_log(avc, AV_LOG_WARNING, "\n"); } -void av_log_ask_for_sample(void *avc, const char *msg) +void av_log_ask_for_sample(void *avc, const char *msg, ...) { + va_list argument_list; + + va_start(argument_list, msg); + if (msg) - av_log(avc, AV_LOG_WARNING, "%s ", msg); + av_vlog(avc, AV_LOG_WARNING, msg, argument_list); av_log(avc, AV_LOG_WARNING, "If you want to help, upload a sample " "of this file to ftp://upload.libav.org/incoming/ " "and contact the libav-devel mailing list.\n"); + + va_end(argument_list); } static AVHWAccel *first_hwaccel = NULL;