Enables libswscale.

http://secure.lv/~nikns/stuff/ports/ffmpeg-20070110.diff

Index: ffmpeg/Makefile
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/Makefile,v
retrieving revision 1.23
diff -u -r1.23 Makefile
--- ffmpeg/Makefile     2 Dec 2006 20:24:17 -0000       1.23
+++ ffmpeg/Makefile     10 Jan 2007 12:46:48 -0000
@@ -2,15 +2,17 @@
 
 COMMENT=       "audio/video converter and streamer with bktr(4) support"
 
-DISTNAME=              ffmpeg-cvs-20060312
-PKGNAME=               ${DISTNAME:S/-cvs//}p2
-SHARED_LIBS=           avutil          1.0 \
-                       avcodec         7.0 \
-                       avformat        7.0 \
-                       postproc        7.0
+DISTNAME=              ffmpeg-cvs-20070110
+PKGNAME=               ${DISTNAME:S/-cvs//}
+SHARED_LIBS=           avutil          2.0 \
+                       avcodec         8.0 \
+                       avformat        8.0 \
+                       postproc        8.0 \
+                       swscale         0.0
 CATEGORIES=            graphics multimedia
 
 HOMEPAGE=              http://www.ffmpeg.org/
+MAINTAINER=            Nikns Siankin <[EMAIL PROTECTED]>
 
 # GPL
 PERMIT_PACKAGE_CDROM=  "patents"
@@ -19,10 +21,15 @@
 PERMIT_DISTFILES_FTP=  Yes
 
 # only available through CVS
-MASTER_SITES=          http://www.jakemsr.com/
+MASTER_SITES=          ftp://ftp.secure.lv/pub/distfiles/
 
 BUILD_DEPENDS=         ::textproc/texi2html
-LIB_DEPENDS=           SDL.>=4::devel/sdl
+LIB_DEPENDS=           SDL.>=4::devel/sdl \
+                       faac::audio/faac \
+                       faad::audio/faad \
+                       mp3lame.>=0.1::audio/lame \
+                       vorbis.>=4.0,vorbisenc.>=2.0::audio/libvorbis
+
 WANTLIB=               X11 Xext c freetype m pthread ossaudio usbhid z
 
 USE_X11=               Yes
@@ -41,21 +48,32 @@
                        --enable-pp \
                        --enable-gpl \
                        --enable-pthreads \
-                       --disable-debug
+                       --disable-debug \
+                       --enable-swscaler \
+                       --enable-faac \
+                       --enable-faad \
+                       --enable-mp3lame \
+                       --enable-libogg \
+                       --enable-vorbis \
+                       --extra-ldflags="-lm -L${LOCALBASE}/lib" \
+                       --extra-cflags=-I${LOCALBASE}/include
+
 
 MAKE_FLAGS=            LIBavutil_VERSION=$(LIBavutil_VERSION) \
                        LIBavcodec_VERSION=$(LIBavcodec_VERSION) \
                        LIBavformat_VERSION=$(LIBavformat_VERSION) \
-                       LIBpostproc_VERSION=$(LIBpostproc_VERSION)
+                       LIBpostproc_VERSION=$(LIBpostproc_VERSION) \
+                       LIBswscale_VERSION=$(LIBswscale_VERSION)
 
 FAKE_FLAGS=            DESTDIR=${WRKINST} \
                        LDCONFIG=true \
                        LIBavutil_VERSION=$(LIBavutil_VERSION) \
                        LIBavcodec_VERSION=$(LIBavcodec_VERSION) \
                        LIBavformat_VERSION=$(LIBavformat_VERSION) \
-                       LIBpostproc_VERSION=$(LIBpostproc_VERSION)
+                       LIBpostproc_VERSION=$(LIBpostproc_VERSION) \
+                       LIBswscale_VERSION=$(LIBswscale_VERSION)
 
-WRKDIST=               ${WRKDIR}/ffmpeg
+REGRESS_TARGET=                codectest
 
 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ffmpeg
Index: ffmpeg/distinfo
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/distinfo,v
retrieving revision 1.10
diff -u -r1.10 distinfo
--- ffmpeg/distinfo     20 Mar 2006 05:50:49 -0000      1.10
+++ ffmpeg/distinfo     10 Jan 2007 12:46:48 -0000
@@ -1,4 +1,4 @@
-MD5 (ffmpeg-cvs-20060312.tar.gz) = 015c1271ea5cd3f96299230ac99d97b4
-RMD160 (ffmpeg-cvs-20060312.tar.gz) = 5be767622750d78a07769a03569a0d271eedc0ba
-SHA1 (ffmpeg-cvs-20060312.tar.gz) = 84c70a386a9b5923bfbc7d33a9ba2806c63dd7f5
-SIZE (ffmpeg-cvs-20060312.tar.gz) = 2195901
+MD5 (ffmpeg-cvs-20070110.tar.gz) = af7284a1e4f49a2f858e5c6537b376ff
+RMD160 (ffmpeg-cvs-20070110.tar.gz) = a0869c18e2791f98d1e791e465f9b2038993497c
+SHA1 (ffmpeg-cvs-20070110.tar.gz) = d4cb810aa1da67bc231e1009544315df625105ea
+SIZE (ffmpeg-cvs-20070110.tar.gz) = 2471143
Index: ffmpeg/patches/patch-Makefile
===================================================================
RCS file: ffmpeg/patches/patch-Makefile
diff -N ffmpeg/patches/patch-Makefile
--- ffmpeg/patches/patch-Makefile       20 Mar 2006 05:50:49 -0000      1.6
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.6 2006/03/20 05:50:49 jakemsr Exp $
---- Makefile.orig      Fri Feb  3 00:31:04 2006
-+++ Makefile   Mon Feb  6 23:48:43 2006
-@@ -59,7 +59,7 @@ endif
- 
- OBJS = ffmpeg.o ffserver.o cmdutils.o $(FFPLAY_O)
- SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
--FFLIBS = -L./libavformat -lavformat$(BUILDSUF) -L./libavcodec 
-lavcodec$(BUILDSUF) -L./libavutil -lavutil$(BUILDSUF)
-+FFLIBS = -L./libavformat -lavformat$(BUILDSUF) -L./libavcodec 
-lavcodec$(BUILDSUF) -L./libavutil -lavutil$(BUILDSUF) -lossaudio -lm -lz 
-pthread
- 
- all: lib $(PROG_G) $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC)
- 
Index: ffmpeg/patches/patch-common_mak
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-common_mak,v
retrieving revision 1.2
diff -u -r1.2 patch-common_mak
--- ffmpeg/patches/patch-common_mak     22 Mar 2006 08:08:42 -0000      1.2
+++ ffmpeg/patches/patch-common_mak     10 Jan 2007 12:46:48 -0000
@@ -1,21 +1,18 @@
-$OpenBSD: patch-common_mak,v 1.2 2006/03/22 08:08:42 jakemsr Exp $
---- common.mak.orig    Sun Feb 26 18:47:05 2006
-+++ common.mak Wed Mar 22 00:04:04 2006
-@@ -75,12 +75,11 @@ install-lib-shared: $(SLIBNAME)
- ifeq ($(CONFIG_WIN32),yes)
-       install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
- else
+$OpenBSD$
+--- common.mak.orig    Tue Jan  2 18:27:55 2007
++++ common.mak Tue Jan  2 18:28:19 2007
+@@ -63,13 +63,7 @@ install-libs: $(INSTLIBTARGETS)
+ 
+ install-lib-shared: $(SLIBNAME)
+       install -d "$(shlibdir)"
 -      install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
--              $(libdir)/$(SLIBNAME_WITH_VERSION)
--      ln -sf $(SLIBNAME_WITH_VERSION) \
--              $(libdir)/$(SLIBNAME_WITH_MAJOR)
--      ln -sf $(SLIBNAME_WITH_VERSION) \
--              $(libdir)/$(SLIBNAME)
+-              "$(shlibdir)/$(SLIBNAME_WITH_VERSION)"
+-      cd "$(shlibdir)" && \
+-              ln -sf $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
+-      cd "$(shlibdir)" && \
+-              ln -sf $(SLIBNAME_WITH_VERSION) $(SLIBNAME)
+-      $(SLIB_INSTALL_EXTRA_CMD)
 +      install -m 755 $(SLIBNAME) $(libdir)
-+      #ln -sf $(SLIBNAME_WITH_VERSION) \
-+      #       $(libdir)/$(SLIBNAME_WITH_MAJOR)
-+      #ln -sf $(SLIBNAME_WITH_VERSION) \
-+      #       $(libdir)/$(SLIBNAME)
- endif
  
  install-lib-static: $(LIB)
+       install -d "$(libdir)"
Index: ffmpeg/patches/patch-configure
===================================================================
RCS file: ffmpeg/patches/patch-configure
diff -N ffmpeg/patches/patch-configure
--- ffmpeg/patches/patch-configure      20 Mar 2006 05:50:49 -0000      1.13
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,94 +0,0 @@
-$OpenBSD: patch-configure,v 1.13 2006/03/20 05:50:49 jakemsr Exp $
---- configure.orig     Tue Feb 28 00:11:44 2006
-+++ configure  Tue Feb 28 00:15:42 2006
-@@ -243,7 +243,7 @@ LIBSUF=".a"
- LIB='$(LIBPREF)$(NAME)$(LIBSUF)'
- SLIBPREF="lib"
- SLIBSUF=".so"
--SLIBNAME='$(SLIBPREF)$(NAME)$(SLIBSUF)'
-+SLIBNAME='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)'
- SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)'
- SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBMAJOR)'
- EXESUF=""
-@@ -324,10 +324,11 @@ bktr="yes"
- audio_oss="yes"
- dv1394="no"
- make="gmake"
-+SHFLAGS='-shared'
- LIBOBJFLAGS="\$(PIC)"
--LDFLAGS="$LDFLAGS -export-dynamic -pthread"
-+LDFLAGS="$LDFLAGS -export-dynamic"
- LDCONFIG="ldconfig -m \$(libdir)"
--extralibs="$extralibs -lossaudio"
-+extralibs=""
- ;;
- FreeBSD)
- v4l="no"
-@@ -1015,10 +1016,12 @@ EOF
- $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
- fi
- 
-+if false ; then
- if test "$_memalign" = "no" -a "$mmx" = "yes" -a "$memalignhack" != "yes"; 
then
-     echo "Error, no memalign() but SSE enabled, disable it or use 
--enable-memalign-hack."
-     exit 1
- fi
-+fi
- 
- cat > $TMPC << EOF
- #include <time.h>
-@@ -1046,7 +1049,8 @@ $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lz 
- # XXX: more tests needed - runtime test
- fi
- if test "$zlib" = "yes"; then
--extralibs="$extralibs -lz"
-+# extralibs="$extralibs -lz"
-+ :
- fi
- 
- if test "$lzo" = "yes" -a "$gpl" = "yes"; then
-@@ -1074,7 +1078,7 @@ int main( void ) { return (lrintf(3.999f
- EOF
- 
- have_lrintf="no"
--if $cc $CFLAGS $LDFLAGS $extralibs -o $TMPE $TMPC 2> /dev/null ; then
-+if $cc $CFLAGS $LDFLAGS -lm -o $TMPE $TMPC 2> /dev/null ; then
-   have_lrintf="yes"
-   # [EMAIL PROTECTED]: cannot execute cross-compiled
-   # code on the host.  Only execute if not cross-compiling.
-@@ -1963,7 +1967,7 @@ Description: FFmpeg utility library
- Version: $lavu_version
- Requires:
- Conflicts:
--Libs: -L\${libdir} -lavutil
-+Libs: -L\${libdir} -lavutil -lm
- Cflags: -I\${includedir} -I\${includedir}/ffmpeg
- EOF
- 
-@@ -1994,7 +1998,7 @@ Description: FFmpeg codec library
- Version: $lavc_version
- Requires: $pkg_requires libavutil = $lavu_version
- Conflicts:
--Libs: -L\${libdir} -lavcodec $extralibs
-+Libs: -L\${libdir} -lavcodec -lavutil -lm -lz -pthread
- Cflags: -I\${includedir} -I\${includedir}/ffmpeg
- EOF
- 
-@@ -2009,7 +2013,7 @@ Description: FFmpeg codec library
- Version: $lavc_version
- Requires: $pkg_requires libavutil = $lavu_version
- Conflicts:
--Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
-+Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} ${extralibs}
- Cflags: -I\${includedir}
- EOF
- 
-@@ -2025,7 +2029,7 @@ Description: FFmpeg container format lib
- Version: $lavf_version
- Requires: $pkg_requires libavcodec = $lavc_version
- Conflicts:
--Libs: -L\${libdir} -lavformat $extralibs
-+Libs: -L\${libdir} -lavformat -lavutil -lossaudio -lavcodec -lm -lz -pthread
- Cflags: -I\${includedir} -I\${includedir}/ffmpeg
- EOF
- 
Index: ffmpeg/patches/patch-libavcodec_Makefile
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libavcodec_Makefile,v
retrieving revision 1.12
diff -u -r1.12 patch-libavcodec_Makefile
--- ffmpeg/patches/patch-libavcodec_Makefile    20 Mar 2006 05:50:49 -0000      
1.12
+++ ffmpeg/patches/patch-libavcodec_Makefile    10 Jan 2007 12:46:48 -0000
@@ -1,24 +1,16 @@
 $OpenBSD: patch-libavcodec_Makefile,v 1.12 2006/03/20 05:50:49 jakemsr Exp $
---- libavcodec/Makefile.orig   Tue Feb 28 00:11:44 2006
-+++ libavcodec/Makefile        Tue Feb 28 00:21:33 2006
-@@ -282,7 +282,7 @@ OBJS+= liba52/bit_allocate.o liba52/bits
- endif
- endif
- 
--EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
-+# EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
- 
- # currently using libdts for dts decoding
- ifeq ($(CONFIG_DTS),yes)
-@@ -396,9 +396,9 @@ endif
+--- libavcodec/Makefile.orig   Mon Jan  8 01:24:14 2007
++++ libavcodec/Makefile        Mon Jan  8 13:43:41 2007
+@@ -402,11 +402,9 @@ CFLAGS += $(CFLAGS-yes)
+ OBJS += $(OBJS-yes)
+ ASM_OBJS += $(ASM_OBJS-yes)
  
+-EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
+-
  NAME=avcodec
- SUBDIR=libavcodec
--LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF)
-+LIBAVUTIL= 
$(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF).$(LIBavutil_VERSION)
  ifeq ($(BUILD_SHARED),yes)
 -LIBVERSION=$(LAVCVERSION)
-+LIBVERSION='$(LIBavcodec_VERSION)'
++LIBVERSION=$(LIBavcodec_VERSION)
  LIBMAJOR=$(LAVCMAJOR)
  endif
- TESTS= imgresample-test dct-test motion-test fft-test
+ 
Index: ffmpeg/patches/patch-libavcodec_dsputil_c
===================================================================
RCS file: ffmpeg/patches/patch-libavcodec_dsputil_c
diff -N ffmpeg/patches/patch-libavcodec_dsputil_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ ffmpeg/patches/patch-libavcodec_dsputil_c   10 Jan 2007 12:46:48 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- libavcodec/dsputil.c.orig  Mon Dec 11 17:53:55 2006
++++ libavcodec/dsputil.c       Tue Jan  2 18:22:01 2007
+@@ -3829,7 +3829,7 @@ void dsputil_init(DSPContext* c, AVCodec
+ {
+     int i;
+ 
+-    ff_check_alignment();
++    /*ff_check_alignment();*/
+ 
+ #ifdef CONFIG_ENCODERS
+     if(avctx->dct_algo==FF_DCT_FASTINT) {
Index: ffmpeg/patches/patch-libavcodec_libpostproc_Makefile
===================================================================
RCS file: ffmpeg/patches/patch-libavcodec_libpostproc_Makefile
diff -N ffmpeg/patches/patch-libavcodec_libpostproc_Makefile
--- ffmpeg/patches/patch-libavcodec_libpostproc_Makefile        20 Mar 2006 
05:50:49 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-libavcodec_libpostproc_Makefile,v 1.4 2006/03/20 05:50:49 
jakemsr Exp $
---- libavcodec/libpostproc/Makefile.orig       Tue Feb 28 00:11:51 2006
-+++ libavcodec/libpostproc/Makefile    Tue Feb 28 00:15:42 2006
-@@ -7,7 +7,7 @@ incdir=$(prefix)/include/postproc
- NAME=postproc
- SUBDIR=libavcodec/libpostproc
- ifeq ($(BUILD_SHARED),yes)
--LIBVERSION=$(SPPVERSION)
-+LIBVERSION='$(LIBpostproc_VERSION)'
- LIBMAJOR=$(SPPMAJOR)
- endif
- 
Index: ffmpeg/patches/patch-libavcodec_mpegaudiodec_c
===================================================================
RCS file: ffmpeg/patches/patch-libavcodec_mpegaudiodec_c
diff -N ffmpeg/patches/patch-libavcodec_mpegaudiodec_c
--- ffmpeg/patches/patch-libavcodec_mpegaudiodec_c      31 Jul 2006 15:03:15 
-0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-libavcodec_mpegaudiodec_c,v 1.1 2006/07/31 15:03:15 millert 
Exp $
---- libavcodec/mpegaudiodec.c.orig     Sun Jul 30 19:39:08 2006
-+++ libavcodec/mpegaudiodec.c  Sun Jul 30 15:44:14 2006
-@@ -1650,7 +1650,7 @@ static int huffman_decode(MPADecodeConte
-             if (get_bits_count(&s->gb) >= end_pos)
-                 break;
-             if (code_table) {
--                code = get_vlc2(&s->gb, vlc->table, 8, 2);
-+                code = get_vlc2(&s->gb, vlc->table, 8, 3);
-                 if (code < 0)
-                     return -1;
-                 y = code_table[code];
Index: ffmpeg/patches/patch-libavcodec_mpegvideo_c
===================================================================
RCS file: ffmpeg/patches/patch-libavcodec_mpegvideo_c
diff -N ffmpeg/patches/patch-libavcodec_mpegvideo_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ ffmpeg/patches/patch-libavcodec_mpegvideo_c 10 Jan 2007 12:46:48 -0000
@@ -0,0 +1,30 @@
+$OpenBSD$
+--- libavcodec/mpegvideo.c.orig        Sat Dec 23 05:05:36 2006
++++ libavcodec/mpegvideo.c     Tue Jan  2 18:22:01 2007
+@@ -4837,7 +4837,7 @@ static int pre_estimate_motion_thread(AV
+ static int estimate_motion_thread(AVCodecContext *c, void *arg){
+     MpegEncContext *s= arg;
+ 
+-    ff_check_alignment();
++    /*ff_check_alignment();*/
+ 
+     s->me.dia_size= s->avctx->dia_size;
+     s->first_slice_line=1;
+@@ -4865,7 +4865,7 @@ static int mb_var_thread(AVCodecContext 
+     MpegEncContext *s= arg;
+     int mb_x, mb_y;
+ 
+-    ff_check_alignment();
++    /*ff_check_alignment();*/
+ 
+     for(mb_y=s->start_mb_y; mb_y < s->end_mb_y; mb_y++) {
+         for(mb_x=0; mb_x < s->mb_width; mb_x++) {
+@@ -4914,7 +4914,7 @@ static int encode_thread(AVCodecContext 
+     PutBitContext pb[2], pb2[2], tex_pb[2];
+ //printf("%d->%d\n", s->resync_mb_y, s->end_mb_y);
+ 
+-    ff_check_alignment();
++    /*ff_check_alignment();*/
+ 
+     for(i=0; i<2; i++){
+         init_put_bits(&pb    [i], bit_buf    [i], MAX_MB_BYTES);
Index: ffmpeg/patches/patch-libavformat_Makefile
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libavformat_Makefile,v
retrieving revision 1.11
diff -u -r1.11 patch-libavformat_Makefile
--- ffmpeg/patches/patch-libavformat_Makefile   20 Mar 2006 05:50:49 -0000      
1.11
+++ ffmpeg/patches/patch-libavformat_Makefile   10 Jan 2007 12:46:48 -0000
@@ -1,21 +1,12 @@
 $OpenBSD: patch-libavformat_Makefile,v 1.11 2006/03/20 05:50:49 jakemsr Exp $
---- libavformat/Makefile.orig  Tue Feb 28 00:11:51 2006
-+++ libavformat/Makefile       Tue Feb 28 00:18:50 2006
-@@ -66,7 +66,7 @@ ifeq ($(CONFIG_AUDIO_OSS),yes)
- OBJS+= audio.o
- endif
+--- libavformat/Makefile.orig  Sun Dec 24 06:51:43 2006
++++ libavformat/Makefile       Tue Jan  2 18:22:01 2007
+@@ -195,7 +195,7 @@ OBJS += $(OBJS-yes)
  
--EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF) -lavcodec$(BUILDSUF) 
-L../libavcodec
-+# EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF) -lavcodec$(BUILDSUF) 
-L../libavcodec
- 
- ifeq ($(CONFIG_AUDIO_BEOS),yes)
- CPPOBJS+= beosaudio.o
-@@ -93,7 +93,7 @@ endif
  NAME=avformat
- SUBDIR=libavformat
  ifeq ($(BUILD_SHARED),yes)
 -LIBVERSION=$(LAVFVERSION)
-+LIBVERSION='$(LIBavformat_VERSION)'
++LIBVERSION=$(LIBavformat_VERSION)
  LIBMAJOR=$(LAVFMAJOR)
  endif
  
Index: ffmpeg/patches/patch-libavformat_utils_c
===================================================================
RCS file: ffmpeg/patches/patch-libavformat_utils_c
diff -N ffmpeg/patches/patch-libavformat_utils_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ ffmpeg/patches/patch-libavformat_utils_c    10 Jan 2007 12:46:48 -0000
@@ -0,0 +1,31 @@
+$OpenBSD$
+--- libavformat/utils.c.orig   Mon Jan  8 16:44:13 2007
++++ libavformat/utils.c        Wed Jan 10 14:38:27 2007
+@@ -1781,7 +1781,7 @@ int av_find_stream_info(AVFormatContext 
+     AVPacketList *pktl=NULL, **ppktl;
+     int64_t last_dts[MAX_STREAMS];
+     int duration_count[MAX_STREAMS]={0};
+-    double duration_error[MAX_STREAMS][MAX_STD_TIMEBASES]={{0}}; //FIXME 
malloc()?
++    double (*duration_error)[MAX_STD_TIMEBASES] = av_mallocz(MAX_STREAMS * 
sizeof(*duration_error));
+ 
+     for(i=0;i<ic->nb_streams;i++) {
+         st = ic->streams[i];
+@@ -1893,7 +1893,7 @@ int av_find_stream_info(AVFormatContext 
+ //                if(st->codec->codec_type == CODEC_TYPE_VIDEO)
+ //                    av_log(NULL, AV_LOG_ERROR, "%f\n", dur);
+                 if(duration_count[index] < 2)
+-                    memset(duration_error, 0, sizeof(duration_error));
++                    memset(duration_error, 0, MAX_STREAMS * 
sizeof(*duration_error));
+                 for(i=1; i<MAX_STD_TIMEBASES; i++){
+                     int framerate= get_std_framerate(i);
+                     int ticks= lrintf(dur*framerate/(1001*12));
+@@ -2013,6 +2013,9 @@ int av_find_stream_info(AVFormatContext 
+         }
+     }
+ #endif
++
++    av_freep(&duration_error);
++
+     return ret;
+ }
+ 
Index: ffmpeg/patches/patch-libavutil_Makefile
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libavutil_Makefile,v
retrieving revision 1.1
diff -u -r1.1 patch-libavutil_Makefile
--- ffmpeg/patches/patch-libavutil_Makefile     20 Mar 2006 05:50:49 -0000      
1.1
+++ ffmpeg/patches/patch-libavutil_Makefile     10 Jan 2007 12:46:48 -0000
@@ -1,12 +1,12 @@
 $OpenBSD: patch-libavutil_Makefile,v 1.1 2006/03/20 05:50:49 jakemsr Exp $
---- libavutil/Makefile.orig    Tue Feb 28 00:11:52 2006
-+++ libavutil/Makefile Tue Feb 28 00:15:42 2006
-@@ -26,7 +26,7 @@ endif
+--- libavutil/Makefile.orig    Tue Nov 14 03:02:30 2006
++++ libavutil/Makefile Mon Dec 11 14:01:08 2006
+@@ -22,7 +22,7 @@ HEADERS = avutil.h common.h mathematics.
+ 
  NAME=avutil
- SUBDIR = libavutil
  ifeq ($(BUILD_SHARED),yes)
 -LIBVERSION=$(LAVUVERSION)
-+LIBVERSION='$(LIBavutil_VERSION)'
++LIBVERSION=$(LIBavutil_VERSION)
  LIBMAJOR=$(LAVUMAJOR)
  endif
  
Index: ffmpeg/patches/patch-libpostproc_Makefile
===================================================================
RCS file: ffmpeg/patches/patch-libpostproc_Makefile
diff -N ffmpeg/patches/patch-libpostproc_Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ ffmpeg/patches/patch-libpostproc_Makefile   10 Jan 2007 12:46:48 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- libpostproc/Makefile.orig  Mon Dec  4 14:38:30 2006
++++ libpostproc/Makefile       Mon Dec  4 14:38:48 2006
+@@ -8,7 +8,7 @@ EXTRALIBS := -L$(BUILD_ROOT)/libavutil -
+ 
+ NAME=postproc
+ ifeq ($(BUILD_SHARED),yes)
+-LIBVERSION=$(SPPVERSION)
++LIBVERSION=$(LIBpostproc_VERSION)
+ LIBMAJOR=$(SPPMAJOR)
+ endif
+ 
Index: ffmpeg/patches/patch-libswscale_Makefile
===================================================================
RCS file: ffmpeg/patches/patch-libswscale_Makefile
diff -N ffmpeg/patches/patch-libswscale_Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ ffmpeg/patches/patch-libswscale_Makefile    10 Jan 2007 12:46:48 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+--- libswscale/Makefile.orig   Tue Jan  2 19:01:04 2007
++++ libswscale/Makefile        Tue Jan  2 19:02:35 2007
+@@ -3,11 +3,9 @@ include ../config.mak
+ 
+ NAME=swscale
+ ifeq ($(BUILD_SHARED),yes)
+-LIBVERSION=$(SWSVERSION)
++LIBVERSION=$(LIBswscale_VERSION)
+ LIBMAJOR=$(SWSMAJOR)
+ endif
+-
+-EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
+ 
+ OBJS= swscale.o rgb2rgb.o
+ ifeq ($(TARGET_ALTIVEC),yes)
Index: ffmpeg/patches/patch-tests_regression_sh
===================================================================
RCS file: ffmpeg/patches/patch-tests_regression_sh
diff -N ffmpeg/patches/patch-tests_regression_sh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ ffmpeg/patches/patch-tests_regression_sh    10 Jan 2007 12:46:48 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- tests/regression.sh.orig   Sat Dec  2 17:03:28 2006
++++ tests/regression.sh        Sat Dec  9 20:16:17 2006
+@@ -89,7 +89,7 @@ fi
+ 
+ 
+ # various files
+-ffmpeg="../ffmpeg_g"
++ffmpeg="env 
LD_LIBRARY_PATH=../libavcodec:../libavutil:../libavformat:../libswscale  
../ffmpeg_g"
+ tiny_psnr="./tiny_psnr"
+ reffile="$2"
+ benchfile="$datadir/ffmpeg.bench"
+@@ -103,6 +103,8 @@ if [ X"`echo | md5sum 2> /dev/null`" != 
+     do_md5sum() { md5sum -b $1; }
+ elif [ -x /sbin/md5 ]; then
+     do_md5sum() { /sbin/md5 -r $1 | sed 's# \**\./# *./#'; }
++elif [ -x /bin/md5 ]; then
++    do_md5sum() { /bin/md5 $1 | sed 's/[)(]//g' | awk '{print $NF " *"$2}'; }
+ else
+     do_md5sum() { echo No md5sum program found; }
+ fi
Index: ffmpeg/pkg/PFRAG.shared
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/pkg/PFRAG.shared,v
retrieving revision 1.13
diff -u -r1.13 PFRAG.shared
--- ffmpeg/pkg/PFRAG.shared     20 Mar 2006 05:50:49 -0000      1.13
+++ ffmpeg/pkg/PFRAG.shared     10 Jan 2007 12:46:48 -0000
@@ -3,6 +3,7 @@
 @lib lib/libavformat.so.${LIBavformat_VERSION}
 @lib lib/libavutil.so.${LIBavutil_VERSION}
 @lib lib/libpostproc.so.${LIBpostproc_VERSION}
[EMAIL PROTECTED] lib/libswscale.so.${LIBswscale_VERSION}
 lib/vhook/drawtext.so
 lib/vhook/fish.so
 lib/vhook/null.so
Index: ffmpeg/pkg/PLIST
===================================================================
RCS file: /cvs/ports/graphics/ffmpeg/pkg/PLIST,v
retrieving revision 1.9
diff -u -r1.9 PLIST
--- ffmpeg/pkg/PLIST    20 Mar 2006 05:50:49 -0000      1.9
+++ ffmpeg/pkg/PLIST    10 Jan 2007 12:46:48 -0000
@@ -4,30 +4,38 @@
 bin/ffplay
 bin/ffserver
 include/ffmpeg/
+include/ffmpeg/adler32.h
 include/ffmpeg/avcodec.h
 include/ffmpeg/avformat.h
 include/ffmpeg/avio.h
 include/ffmpeg/avutil.h
 include/ffmpeg/common.h
-include/ffmpeg/dsputil.h
+include/ffmpeg/fifo.h
 include/ffmpeg/integer.h
 include/ffmpeg/intfloat_readwrite.h
+include/ffmpeg/log.h
 include/ffmpeg/mathematics.h
+include/ffmpeg/md5.h
+include/ffmpeg/opt.h
 include/ffmpeg/rational.h
+include/ffmpeg/rgb2rgb.h
 include/ffmpeg/rtp.h
 include/ffmpeg/rtsp.h
 include/ffmpeg/rtspcodes.h
+include/ffmpeg/swscale.h
 include/postproc/
 include/postproc/postprocess.h
 lib/libavcodec.a
 lib/libavformat.a
 lib/libavutil.a
 lib/libpostproc.a
+lib/libswscale.a
 lib/pkgconfig/
 lib/pkgconfig/libavcodec.pc
 lib/pkgconfig/libavformat.pc
 lib/pkgconfig/libavutil.pc
 lib/pkgconfig/libpostproc.pc
+lib/pkgconfig/libswscale.pc
 lib/vhook/
 @man man/man1/ffmpeg.1
 @man man/man1/ffplay.1

Reply via email to