[FFmpeg-devel] [PATCH] Adding support for OSX bundles to ffmpeg command line
Måns Rullgård
mans
Fri Mar 20 17:50:44 CET 2009
Chris Marrin <chris at marrin.com> writes:
> @@ -3915,7 +3930,16 @@
> {
> int i;
> int64_t ti;
> -
> +
> + // get the executable path
> + char* p = strrchr(argv[0], '/');
> + if (p) {
> + int length = p-argv[0];
> + executable_path = av_malloc(length+1);
> + strncpy(executable_path, argv[0], length);
> + executable_path[length] = '\0';
> + }
> +
There are a million ways in which this can fail.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list