update Features5.pdf, fixes for awindowgui
[goodguy/history.git] / cinelerra-5.1 / cinelerra / ffmpeg.C
index 37a999298b0487c9ce726015f61dfd616e97bba6..8673e6f39fb10eb4aba5e3a76456bf2bdd83b3d0 100644 (file)
@@ -1134,13 +1134,15 @@ AVRational FFMPEG::to_time_base(int sample_rate)
 
 void FFMPEG::set_option_path(char *path, const char *fmt, ...)
 {
-       get_exe_path(path);
-       strcat(path, "/ffmpeg/");
+       char *ep = path + BCTEXTLEN-1;
+       strncpy(path, File::get_cindat_path(), ep-path);
+       strncat(path, "/ffmpeg/", ep-path);
        path += strlen(path);
        va_list ap;
        va_start(ap, fmt);
-       vsprintf(path, fmt, ap);
+       path += vsnprintf(path, ep-path, fmt, ap);
        va_end(ap);
+       *path = 0;
 }
 
 void FFMPEG::get_option_path(char *path, const char *type, const char *spec)