X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Flibzmpeg3%2Flibzmpeg3.h;h=430ebb4d79ed4b40cc80d415b72e7ecc797d0d8e;hb=c279e21fc2394a7908bbd1ba8c79b116fe9fb14a;hp=e12321850a2cd1d2490ba8b7c71fcf219d3e88b9;hpb=235c9cc4df8306babbbfda46189108fe262d44ef;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/libzmpeg3/libzmpeg3.h b/cinelerra-5.1/libzmpeg3/libzmpeg3.h index e1232185..430ebb4d 100644 --- a/cinelerra-5.1/libzmpeg3/libzmpeg3.h +++ b/cinelerra-5.1/libzmpeg3/libzmpeg3.h @@ -1,5 +1,6 @@ #ifndef LIBMPEG3_H #define LIBMPEG3_H +#ifdef HAVE_LIBZMPEG /* for quicktime build */ #define MAXFRAMESAMPLES 65536 @@ -94,7 +95,7 @@ extern "C" { #define new_memset(s) \ void *operator new(size_t n) { \ - void *t = (void*) new char[n]; \ + void * volatile t = (void*) new char[n]; \ memset(t,s,n); \ return t; \ } \ @@ -102,7 +103,7 @@ extern "C" { delete[](char*)t; \ } \ void *operator new[](size_t n) { \ - void *t = (void*) new char[n]; \ + void * volatile t = (void*) new char[n]; \ memset(t,s,n); \ return t; \ } \ @@ -2846,9 +2847,9 @@ public: } static inline void complete_path(char *full_path, char *path) { - char dir[zmpeg3_t::STRLEN]; + char dir[STRLEN]; if( path[0] != '/' && getcwd(dir, sizeof(dir)) ) - sprintf(full_path, "%s/%s", dir, path); + snprintf(full_path, STRLEN, "%s/%s", dir, path); else strcpy(full_path, path); } @@ -2875,7 +2876,7 @@ public: } static inline void joinpath(char *path, char *dir, char *filename) { - sprintf(path, "%s/%s", dir, filename); + snprintf(path, STRLEN, "%s/%s", dir, filename); } static inline int64_t path_total_bytes(char *path) { @@ -3092,3 +3093,4 @@ int mpeg3_dvb_get_system_time(mpeg3_t *zsrc, int64_t *tm); } #endif #endif +#endif