* modules/stream_out/transcode.c: fixed small memleak.
[vlc.git] / 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 @@ -473,7 +473,6 @@
23    --disable-audio-oss) audio_oss="no"
24    ;;
25    --disable-audio-beos) audio_beos="no"
26 -    extralibs="$extralibs -lbe -lmedia"
27    ;;
28    --disable-dv1394) dv1394="no"
29    ;;                                                                           
30 @@ -867,6 +866,18 @@
31  ranlib="${cross_prefix}${ranlib}"
32  strip="${cross_prefix}${strip}"
33  
34 +if test "${cross_prefix}" = "i586-pc-beos-"; then
35 +  # Cross-compiling from Linux for BeOS
36 +  CFLAGS="$CFLAGS -DPIC -fomit-frame-pointer -fno-expensive-optimizations"
37 +  SHFLAGS=-nostart
38 +  audio_oss="no"
39 +  v4l="no"
40 +  dv1394="no"
41 +  netserver="yes"
42 +  need_inet_aton="yes"
43 +  extralibs="-lnet"
44 +fi
45 +
46  if test -z "$cross_prefix" ; then
47  
48  # ---
49 @@ -985,6 +996,7 @@
50  EOF
51  
52  have_lrintf="no"
53 +if test "${cross_prefix}" != "i586-pc-beos-"; then
54  if $cc $CFLAGS $LDFLAGS $extralibs -o $TMPE $TMPC 2> /dev/null ; then
55    have_lrintf="yes"
56    # allanc@chickenandporn.com: cannot execute cross-compiled
57 @@ -993,6 +1005,7 @@
58      $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
59    fi
60  fi
61 +fi
62  
63  _restrict=
64  for restrict_keyword in restrict __restrict__ __restrict; do
65 diff -ru ffmpeg-orig/libavcodec/eval.c ffmpeg/libavcodec/eval.c
66 --- ffmpeg-orig/libavcodec/eval.c       2005-10-23 16:00:22.000000000 +0200
67 +++ ffmpeg/libavcodec/eval.c    2005-10-23 16:05:34.000000000 +0200
68 @@ -34,6 +34,8 @@
69  #include <string.h>
70  #include <math.h>
71  
72 +/* Meuuh power */
73 +#undef NAN
74  #ifndef NAN
75    #define NAN 0
76  #endif
77 diff -ru ffmpeg-orig/libavformat/tcp.c ffmpeg/libavformat/tcp.c
78 --- ffmpeg-orig/libavformat/tcp.c       2005-10-23 16:00:22.000000000 +0200
79 +++ ffmpeg/libavformat/tcp.c    2005-10-23 16:06:19.000000000 +0200
80 @@ -32,6 +32,7 @@
81  #include <netdb.h>
82  #include <sys/time.h>
83  #include <fcntl.h>
84 +#define socklen_t int
85  
86  typedef struct TCPContext {
87      int fd;
88 @@ -112,11 +113,13 @@
89                  break;
90          }
91          
92 +#ifndef __BEOS__
93          /* test error */
94          optlen = sizeof(ret);
95          getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen);
96          if (ret != 0)
97              goto fail;
98 +#endif
99      }
100      s->fd = fd;
101      return 0;