[FFmpeg-cvslog] log: Remove redundant va_list creation from missing_feature_sample()

James Almer git at videolan.org
Sat Apr 13 21:24:24 CEST 2013


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Apr  5 03:49:17 2013 -0300| [572e38a513139b21c35acfef13aa7c4e307ab648] | committer: Michael Niedermayer

log: Remove redundant va_list creation from missing_feature_sample()

avpriv_request_sample() and avpriv_report_missing_feature() were printing bogus values for the extra arguments.

Signed-off-by: James Almer <jamrial at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=572e38a513139b21c35acfef13aa7c4e307ab648
---

 libavutil/log.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/libavutil/log.c b/libavutil/log.c
index a274134..6051418 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -281,12 +281,8 @@ 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, ...)
+static void missing_feature_sample(int sample, void *avc, const char *msg, va_list argument_list)
 {
-    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 "
@@ -296,8 +292,6 @@ static void missing_feature_sample(int sample, void *avc, const char *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");
-
-    va_end(argument_list);
 }
 
 void avpriv_request_sample(void *avc, const char *msg, ...)



More information about the ffmpeg-cvslog mailing list