On Tue, 4 Oct 2011 15:57:36 +0300, Georgi Chorbadzhiyski <[email protected]> wrote: > When requesting debug info the user is already instructed to > copy the full program output but in addition to that it needs > to provide how the program was called. With this change all > command line parameters that are used are shown in the output > when verbose output is enabled. > --- > > Note: argv[0] is intentionally skipped. > > Diffstat: > avconv.c | 2 +- > avplay.c | 2 +- > avprobe.c | 2 +- > avserver.c | 2 +- > cmdutils.c | 19 ++++++++++++++++++- > cmdutils.h | 2 +- > ffmpeg.c | 2 +- > 7 files changed, 24 insertions(+), 7 deletions(-) > > -void show_banner(void) > +void show_banner(int argc, char **argv) > { > + char *params; > + int i, argv_len = 0; > + > + for (i=1; i<argc; i++) > + argv_len += strlen(argv[i]); > + > + params = av_mallocz(argv_len + argc + 1); > + for (i=1; i<argc; i++) { > + strcat(params, argv[i]); > + strcat(params, " "); > + } > + if (strlen(params)) > + params[strlen(params)-1] = '\0'; > +
Why all the copying? Why don't you just print them directly? -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
