]> git.sesse.net Git - vlc/blob - extras/contrib/src/Patches/ffmpeg.patch.cvs
Patches/ffmpeg.patch.cvs: fix for current CVS (hunk was failing)
[vlc] / extras / contrib / src / Patches / ffmpeg.patch.cvs
1 diff -ru ffmpeg-orig/configure ffmpeg/configure
2 --- ffmpeg-orig/configure       2005-10-23 16:00:23.000000000 +0200
3 +++ ffmpeg/configure    2005-10-23 16:05:03.000000000 +0200
4 @@ -254,7 +254,7 @@
5  2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
6  mmx="no"
7  ;;
8 -*20010315*) echo "BeBits gcc"
9 +*20010315*|2.95.3*) echo "BeBits gcc"
10  CFLAGS="$CFLAGS -fno-expensive-optimizations"
11  ;;
12  esac
13 @@ -448,7 +448,7 @@
14    ;;
15    --extra-ldflags=*) LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
16    ;;
17 -  --extra-libs=*) extralibs=${opt#--extra-libs=}
18 +  --extra-libs=*) extralibs="$extralibs ${opt#--extra-libs=}"
19    ;;
20    --build-suffix=*) BUILDSUF=${opt#--build-suffix=}
21    ;;
22 @@ -867,6 +867,18 @@
23  ranlib="${cross_prefix}${ranlib}"
24  strip="${cross_prefix}${strip}"
25  
26 +if test "${cross_prefix}" = "i586-pc-beos-"; then
27 +  # Cross-compiling from Linux for BeOS
28 +  CFLAGS="$CFLAGS -DPIC -fomit-frame-pointer -fno-expensive-optimizations"
29 +  SHFLAGS=-nostart
30 +  audio_oss="no"
31 +  v4l="no"
32 +  dv1394="no"
33 +  netserver="yes"
34 +  need_inet_aton="yes"
35 +  extralibs="-lnet"
36 +fi
37 +
38  if test -z "$cross_prefix" ; then
39  
40  # ---
41 @@ -985,6 +997,7 @@
42  EOF
43  
44  have_lrintf="no"
45 +if test "${cross_prefix}" != "i586-pc-beos-"; then
46  if $cc $CFLAGS $LDFLAGS $extralibs -o $TMPE $TMPC 2> /dev/null ; then
47    have_lrintf="yes"
48    # allanc@chickenandporn.com: cannot execute cross-compiled
49 @@ -993,6 +1006,7 @@
50      $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
51    fi
52  fi
53 +fi
54  
55  _restrict=
56  for restrict_keyword in restrict __restrict__ __restrict; do
57 diff -ru ffmpeg-orig/libavcodec/eval.c ffmpeg/libavcodec/eval.c
58 --- ffmpeg-orig/libavcodec/eval.c       2005-10-23 16:00:22.000000000 +0200
59 +++ ffmpeg/libavcodec/eval.c    2005-10-23 16:05:34.000000000 +0200
60 @@ -34,6 +34,8 @@
61  #include <string.h>
62  #include <math.h>
63  
64 +/* Meuuh power */
65 +#undef NAN
66  #ifndef NAN
67    #define NAN 0
68  #endif
69 diff -ru ffmpeg-orig/libavformat/tcp.c ffmpeg/libavformat/tcp.c
70 --- ffmpeg-orig/libavformat/tcp.c       2005-10-23 16:00:22.000000000 +0200
71 +++ ffmpeg/libavformat/tcp.c    2005-10-23 16:06:19.000000000 +0200
72 @@ -32,6 +32,7 @@
73  #include <netdb.h>
74  #include <sys/time.h>
75  #include <fcntl.h>
76 +#define socklen_t int
77  
78  typedef struct TCPContext {
79      int fd;
80 @@ -112,11 +113,13 @@
81                  break;
82          }
83          
84 +#ifndef __BEOS__
85          /* test error */
86          optlen = sizeof(ret);
87          getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen);
88          if (ret != 0)
89              goto fail;
90 +#endif
91      }
92      s->fd = fd;
93      return 0;