From: Kenneth L. <ke...@la...> - 2006-06-01 01:24:06
|
SVN 83. Checked in untested. Kenneth Peter Smith wrote: > Here is the patch, I think I included the old one in my last message. > Sorry. > > Peter > > Angel Carpintero wrote: >> El jue, 01-06-2006 a las 01:08 +0200, Kenneth Lavrsen escribió: >> >> Hi Kenneth & Peter, >> >> >>> Committed to SVN (82). >>> >> >> >>> Kenneth >>> >> >> This commit makes some warning in debian/ubuntu : >> >> ffmpeg.c: En la función `ffmpeg_init': >> ffmpeg.c:132: aviso: al pasar el argumento 1 de `av_log_set_callback' de >> tipo de puntero incompatible ( incompatible pointer type ). >> ffmpeg.c: En la función `ffmpeg_avcodec_log': >> ffmpeg.c:644: aviso: `vars' might be used uninitialized in this function >> >> >>> Peter Smith wrote: >>> >>>> Kenneth, here is a patch (against the repository) that should fix not >>>> only the compiler error with regards to the va_list parameter, but >>>> will move the avicodec logging to debug level only (which is a very >>>> simply add obviously.) >>>> >>>> Thanks, >>>> Peter >>>> >>>> -------------------------------------------- >>>> >> >> So i guess the best option is to rollback the commit and fix the problem >> as Andrew said , including stdarg.h in ffmpeg.h . >> >> >> Cheers, >> > ------------------------------------------------------------------------ > > --- ffmpeg.c (revision 82) > +++ ffmpeg.c (working copy) > @@ -641,9 +641,17 @@ > */ > void ffmpeg_avcodec_log(void *ignoreme ATTRIBUTE_UNUSED, int errno_flag, const char *message, ...) > { > - va_list( vars ); > + va_list vars; > > - motion_log(LOG_ERR, 0, "ffmpeg_avcodec_log: %s - flag %d", message, vars, errno_flag); > + /* Get the message from the argument list passed in */ > + va_start(vars, message); > + > + /* If the debug_level is correct then send the message to the motion logging routine. */ > + if (debug_level) > + motion_log(LOG_ERR, 0, "ffmpeg_avcodec_log: %s - flag %d", message, vars, errno_flag); > + > + /* Clean up the argument list routine */ > + va_end(vars); > } > > #endif /* HAVE_FFMPEG */ > > --- ffmpeg.h (revision 82) > +++ ffmpeg.h (working copy) > @@ -5,6 +5,9 @@ > #include <avformat.h> > #endif > > +#include <stdio.h> > +#include <stdarg.h> > + > /* Define a codec name/identifier for timelapse videos, so that we can > * differentiate between normal mpeg1 videos and timelapse videos. > */ > |