diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2018-08-05 11:50:24 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2018-08-05 11:50:24 +0000 |
commit | e3166d73c6ae7652efe2c365ae4790f1e43984b4 (patch) | |
tree | fb5ee0e57c3e82cc88f3238b5c38dfd847126a6b /patches/libtheora/fix-timeb.patch | |
parent | 6bc683c576b8216cf1672f2d884b704737d09af8 (diff) | |
download | midipix_build-e3166d73c6ae7652efe2c365ae4790f1e43984b4.tar.bz2 midipix_build-e3166d73c6ae7652efe2c365ae4790f1e43984b4.tar.xz |
vars/build.vars:native_packages_deps: adds lib{xslt,theora} v{1.1.32,1.1.1} (via Redfoxmoon.)
vars/build.vars:native_packages_inet: adds microsocks (HEAD) (via Redfoxmoon.)
patches/lib{theora,xslt}*: via Redfoxmoon.
Diffstat (limited to 'patches/libtheora/fix-timeb.patch')
-rw-r--r-- | patches/libtheora/fix-timeb.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/patches/libtheora/fix-timeb.patch b/patches/libtheora/fix-timeb.patch new file mode 100644 index 00000000..5344c075 --- /dev/null +++ b/patches/libtheora/fix-timeb.patch @@ -0,0 +1,75 @@ +--- libtheora-1.1.1.orig/examples/dump_psnr.c ++++ libtheora-1.1.1/examples/dump_psnr.c +@@ -37,7 +37,6 @@ + #endif + #include <stdlib.h> + #include <string.h> +-#include <sys/timeb.h> + #include <sys/types.h> + #include <sys/stat.h> + /*Yes, yes, we're going to hell.*/ +--- libtheora-1.1.1.orig/examples/dump_video.c ++++ libtheora-1.1.1/examples/dump_video.c +@@ -37,7 +37,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-#include <sys/timeb.h> ++#include <sys/time.h> + #include <sys/types.h> + #include <sys/stat.h> + /*Yes, yes, we're going to hell.*/ +@@ -205,9 +205,9 @@ + int long_option_index; + int c; + +- struct timeb start; +- struct timeb after; +- struct timeb last; ++ struct timeval start; ++ struct timeval after; ++ struct timeval last; + int fps_only=0; + int frames = 0; + +@@ -418,8 +418,8 @@ + } + + if(fps_only){ +- ftime(&start); +- ftime(&last); ++ gettimeofday(&start, NULL); ++ gettimeofday(&last, NULL); + } + + while(!got_sigint){ +@@ -433,7 +433,7 @@ + videobuf_ready=1; + frames++; + if(fps_only) +- ftime(&after); ++ gettimeofday(&after, NULL); + } + + }else +@@ -442,16 +442,16 @@ + + if(fps_only && (videobuf_ready || fps_only==2)){ + long ms = +- after.time*1000.+after.millitm- +- (last.time*1000.+last.millitm); ++ after.tv_sec*1000.+after.tv_usec/1000- ++ (last.tv_sec*1000.+last.tv_usec/1000); + + if(ms>500 || fps_only==1 || + (feof(infile) && !videobuf_ready)){ + float file_fps = (float)ti.fps_numerator/ti.fps_denominator; + fps_only=2; + +- ms = after.time*1000.+after.millitm- +- (start.time*1000.+start.millitm); ++ ms = after.tv_sec*1000.+after.tv_usec/1000- ++ (start.tv_sec*1000.+start.tv_usec/1000); + + fprintf(stderr,"\rframe:%d rate:%.2fx ", + frames, |