On Sat, Mar 26, 2011 at 03:01:24PM +0000, Jacob Meuser wrote: > > Replacing --disable-altivec by --disable-asm lets ffmpeg build and run in > > basic testing. I'm not sure we want that fix, nor if its a good thing > > for all archs. > > afaics, we have to, at least on ppc. and on ppc it only affects the > file that doesn't build. unless there's a binutil update coming ...
So.. If I see this correctly, this brings us to here: Index: Makefile =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/Makefile,v retrieving revision 1.68 diff -u -p -u -r1.68 Makefile --- Makefile 12 Feb 2011 10:48:56 -0000 1.68 +++ Makefile 29 Mar 2011 16:00:43 -0000 @@ -2,21 +2,21 @@ COMMENT= audio/video converter and streamer with bktr(4) support -V= 20100512 -DISTNAME= ffmpeg-svn-${V} +V= 20110306 +DISTNAME= ffmpeg-git-${V} PKGNAME= ffmpeg-${V} -REVISION= 6 CATEGORIES= graphics multimedia -MASTER_SITES= http://comstyle.com/source/ \ - http://gormsby.com/downloads/ - -SHARED_LIBS= avcodec 14.0 \ - avdevice 3.0 \ - avfilter 1.0 \ - avformat 13.0 \ - avutil 7.0 \ - postproc 13.0 \ - swscale 2.0 +#MASTER_SITES= http://comstyle.com/source/ \ +# http://gormsby.com/downloads/ +MASTER_SITES= http://theunixzoo.co.uk/distfiles/ + +SHARED_LIBS= avcodec 15.0 \ + avdevice 4.0 \ + avfilter 2.0 \ + avformat 14.0 \ + avutil 8.0 \ + postproc 14.0 \ + swscale 3.0 HOMEPAGE= http://ffmpeg.mplayerhq.hu/ @@ -31,7 +31,7 @@ PERMIT_DISTFILES_FTP= Yes MODULES= gcc3 MODGCC3_ARCHES= sparc -WANTLIB= SDL X11 Xext Xfixes bz2 c faac faad gsm m mp3lame ogg \ +WANTLIB= SDL X11 Xext Xfixes bz2 c faac gsm m mp3lame ogg \ orc-0.4 pthread schroedinger-1.0>=2 sndio speex theora \ theoradec theoraenc vorbis vorbisenc x264 z @@ -41,7 +41,6 @@ BUILD_DEPENDS+= devel/yasm .endif LIB_DEPENDS= archivers/bzip2 \ audio/faac \ - audio/faad \ audio/lame \ audio/libvorbis \ audio/speex \ @@ -51,13 +50,18 @@ LIB_DEPENDS= archivers/bzip2 \ multimedia/schroedinger>=1.0.10 \ multimedia/x264 +# binutils fun +.if ${MACHINE_ARCH:Mpowerpc} +CONFIGURE_ARGS += --disable-asm +.endif + .if ${MACHINE_ARCH:Marm} # uses ARM EABI -CONFIGURE_ARGS+= --arch=generic +CONFIGURE_ARGS+= --arch=generic .endif # inter-library dependencies for the current configuration -LIBavcodec_EXTRALIBS=-L${LOCALBASE}/lib -lfaac -lfaad -lgsm -lm -lmp3lame -logg -lorc-0.4 -lschroedinger-1.0 -lspeex -ltheora -lvorbis -lvorbisenc -lx264 -lz -pthread -Wl,-rpath,${LOCALBASE}/lib +LIBavcodec_EXTRALIBS=-L${LOCALBASE}/lib -lfaac -lgsm -lm -lmp3lame -logg -lorc-0.4 -lschroedinger-1.0 -lspeex -ltheora -lvorbis -lvorbisenc -lx264 -lz -pthread -Wl,-rpath,${LOCALBASE}/lib LIBavdevice_EXTRALIBS=-L${X11BASE}/lib -lX11 -lXext -lXfixes -lm -lsndio -Wl,-rpath,${LOCALBASE}/lib -Wl,-rpath,${X11BASE}/lib LIBavfilter_EXTRALIBS=-lm LIBavformat_EXTRALIBS=-L${LOCALBASE}/lib -lbz2 -lm -Wl,-rpath,${LOCALBASE}/lib @@ -72,7 +76,6 @@ USE_GMAKE= Yes CONFIGURE_STYLE= simple CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \ --cc=${CC} \ - --disable-altivec \ --disable-armv5te \ --disable-armv6 \ --disable-armv6t2 \ @@ -86,7 +89,6 @@ CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \ --disable-outdev=oss \ --enable-gpl \ --enable-libfaac \ - --enable-libfaad \ --enable-libgsm \ --enable-libmp3lame \ --enable-libschroedinger \ @@ -144,8 +146,12 @@ ALL_TARGET= all tools/qt-faststart #REGRESS_TARGET= codectest NO_REGRESS= Yes -HTML_DOCS= developer faq ffmpeg-doc ffplay-doc ffprobe-doc ffserver-doc \ +HTML_DOCS= developer faq ffmpeg ffplay ffprobe ffserver \ general libavfilter + +# When you are rolling your distfile, you need to get the version string +# from 'git describe --always' *before* you remove the .git directory. +MAKE_ENV += OBSD_VSTR=git-f4f4e12 post-extract: @cp -f ${FILESDIR}/sndio_* ${WRKSRC}/libavdevice Index: distinfo =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/distinfo,v retrieving revision 1.17 diff -u -p -u -r1.17 distinfo --- distinfo 26 May 2010 21:38:52 -0000 1.17 +++ distinfo 29 Mar 2011 16:00:43 -0000 @@ -1,5 +1,5 @@ -MD5 (ffmpeg-svn-20100512.tar.gz) = 0Ic9e4MjT5ojQBIDeon7mg== -RMD160 (ffmpeg-svn-20100512.tar.gz) = fRrUeD6aOwVZNtxa0kK6ze58qCU= -SHA1 (ffmpeg-svn-20100512.tar.gz) = m71qLC5grF6szPeh8e5LAW+f+H0= -SHA256 (ffmpeg-svn-20100512.tar.gz) = HH3p8NhV4pI6G/PC0RUNInip/6C30QdUCKPr2qgCAjo= -SIZE (ffmpeg-svn-20100512.tar.gz) = 4484770 +MD5 (ffmpeg-git-20110306.tar.gz) = sfTm9NP2uKSM6gBhiuAfoA== +RMD160 (ffmpeg-git-20110306.tar.gz) = ec7bfWXTeMQKDoHSTmnDQWZ/0Pk= +SHA1 (ffmpeg-git-20110306.tar.gz) = s6wHaPwZFMZRaaT+/LP+HiNaSCk= +SHA256 (ffmpeg-git-20110306.tar.gz) = Av5pUZYm1q+shteP/tHYeHgF98bB3whT20zIyq1x5L8= +SIZE (ffmpeg-git-20110306.tar.gz) = 4865660 Index: files/sndio_dec.c =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/files/sndio_dec.c,v retrieving revision 1.2 diff -u -p -u -r1.2 sndio_dec.c --- files/sndio_dec.c 15 Sep 2010 15:40:00 -0000 1.2 +++ files/sndio_dec.c 29 Mar 2011 16:00:43 -0000 @@ -94,7 +94,7 @@ static av_cold int audio_read_close(AVFo return 0; } -AVInputFormat sndio_demuxer = { +AVInputFormat ff_sndio_demuxer = { .name = "sndio", .long_name = NULL_IF_CONFIG_SMALL("sndio audio capture"), .priv_data_size = sizeof(AudioData), Index: files/sndio_enc.c =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/files/sndio_enc.c,v retrieving revision 1.1 diff -u -p -u -r1.1 sndio_enc.c --- files/sndio_enc.c 3 Sep 2010 16:39:13 -0000 1.1 +++ files/sndio_enc.c 29 Mar 2011 16:00:43 -0000 @@ -75,7 +75,7 @@ static int audio_write_trailer(AVFormatC return 0; } -AVOutputFormat sndio_muxer = { +AVOutputFormat ff_sndio_muxer = { .name = "sndio", .long_name = NULL_IF_CONFIG_SMALL("sndio audio playback"), .priv_data_size = sizeof(AudioData), Index: patches/patch-Makefile =================================================================== RCS file: patches/patch-Makefile diff -N patches/patch-Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-Makefile 29 Mar 2011 16:00:43 -0000 @@ -0,0 +1,15 @@ +$OpenBSD$ +--- Makefile.orig Wed Mar 23 20:34:51 2011 ++++ Makefile Wed Mar 23 20:37:24 2011 +@@ -104,8 +104,9 @@ SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries + .version: M=@ + + version.h .version: +- $(M)$(VERSION_SH) $(SRC_PATH) version.h $(EXTRA_VERSION) +- $(Q)touch .version ++# $(M)$(VERSION_SH) $(SRC_PATH) version.h $(EXTRA_VERSION) ++# $(Q)touch .version ++ echo "#define FFMPEG_VERSION \"${OBSD_VSTR}\"" > ${SRC_PATH}/version.h + + # force version.sh to run whenever version might have changed + -include .version Index: patches/patch-configure =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-configure,v retrieving revision 1.24 diff -u -p -u -r1.24 patch-configure --- patches/patch-configure 3 Sep 2010 16:39:13 -0000 1.24 +++ patches/patch-configure 29 Mar 2011 16:00:43 -0000 @@ -1,15 +1,7 @@ $OpenBSD: patch-configure,v 1.24 2010/09/03 16:39:13 sthen Exp $ ---- configure.orig Tue May 11 19:21:00 2010 -+++ configure Thu Aug 19 21:51:04 2010 -@@ -1064,7 +1064,6 @@ HAVE_LIST=" - lzo1x_999_compress - machine_ioctl_bt848_h - machine_ioctl_meteor_h -- malloc_h - memalign - mkstemp - pld -@@ -1076,6 +1075,7 @@ HAVE_LIST=" +--- configure.orig Sun Mar 6 15:03:48 2011 ++++ configure Mon Mar 7 00:29:31 2011 +@@ -1066,6 +1066,7 @@ HAVE_LIST=" setmode socklen_t soundcard_h @@ -17,7 +9,7 @@ $OpenBSD: patch-configure,v 1.24 2010/09 poll_h setrlimit strerror_r -@@ -1396,6 +1396,8 @@ jack_indev_extralibs="-ljack" +@@ -1405,6 +1406,8 @@ jack_indev_deps="jack_jack_h" libdc1394_indev_deps="libdc1394" oss_indev_deps_any="soundcard_h sys_soundcard_h" oss_outdev_deps_any="soundcard_h sys_soundcard_h" @@ -25,8 +17,8 @@ $OpenBSD: patch-configure,v 1.24 2010/09 +sndio_outdev_deps="sndio_h" v4l_indev_deps="linux_videodev_h" v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h" - vfwcap_indev_deps="capCreateCaptureWindow" -@@ -1465,6 +1467,10 @@ cpu="generic" + vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines" +@@ -1589,6 +1592,10 @@ cpu="generic" target_os_default=$(tolower $(uname -s)) host_os=$target_os_default @@ -37,24 +29,24 @@ $OpenBSD: patch-configure,v 1.24 2010/09 # configurable options enable avcodec enable avdevice -@@ -2167,6 +2173,7 @@ case $target_os in - # Thus explicitly enable PIC here. +@@ -2335,6 +2342,7 @@ case $target_os in enable pic + disable symver SHFLAGS='-shared' + SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBVERSION)' oss_indev_extralibs="-lossaudio" oss_outdev_extralibs="-lossaudio" ;; -@@ -2605,7 +2612,7 @@ enabled libdirac && add_cflags $(pkg-config --cflags +@@ -2822,7 +2830,7 @@ enabled libdirac && add_cflags $(pkg-config --cflags + require libdirac libdirac_decoder/dirac_parser.h dirac_decoder_init $(pkg-config --libs dirac) && require libdirac libdirac_encoder/dirac_encoder.h dirac_encoder_init $(pkg-config --libs dirac) enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac - enabled libfaad && require2 libfaad faad.h faacDecOpen -lfaad -enabled libgsm && require libgsm gsm/gsm.h gsm_create -lgsm +enabled libgsm && require libgsm gsm.h gsm_create -lgsm - enabled libmp3lame && require libmp3lame lame/lame.h lame_init -lmp3lame -lm + enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame enabled libnut && require libnut libnut.h nut_demuxer_init -lnut - enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb -lm -@@ -2687,11 +2694,14 @@ check_header dev/ic/bt8xx.h + enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb +@@ -2890,11 +2898,14 @@ check_header dev/ic/bt8xx.h check_header sys/soundcard.h check_header soundcard.h @@ -69,17 +61,17 @@ $OpenBSD: patch-configure,v 1.24 2010/09 enabled x11grab && check_header X11/Xlib.h && check_header X11/extensions/XShm.h && -@@ -2726,9 +2736,6 @@ enabled extra_warnings && check_cflags -Winline +@@ -2930,9 +2941,6 @@ enabled extra_warnings && check_cflags -Winline # add some linker flags check_ldflags -Wl,--warn-common -check_ldflags -Wl,--as-needed -check_ldflags '-Wl,-rpath-link,\$(BUILD_ROOT)/libpostproc -Wl,-rpath-link,\$(BUILD_ROOT)/libswscale -Wl,-rpath-link,\$(BUILD_ROOT)/libavfilter -Wl,-rpath-link,\$(BUILD_ROOT)/libavdevice -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil' --check_ldflags -Wl,-Bsymbolic +-test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic echo "X{};" > $TMPV - test_ldflags -Wl,--version-script,$TMPV && -@@ -3123,8 +3130,7 @@ Version: $version + if test_ldflags -Wl,--version-script,$TMPV; then +@@ -3368,8 +3376,7 @@ Version: $version Requires: $(enabled shared || echo $requires) Requires.private: $(enabled shared && echo $requires) Conflicts: @@ -89,23 +81,21 @@ $OpenBSD: patch-configure,v 1.24 2010/09 Cflags: -I\${includedir} EOF cat <<EOF > $name/$name-uninstalled.pc -@@ -3143,12 +3149,12 @@ Cflags: -I\${includedir} +@@ -3388,10 +3395,10 @@ Cflags: -I\${includedir} EOF } -pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" --pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION" +-pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" -pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION" -pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION" -+pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBavutil_EXTRALIBS" -+pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$LIBavcodec_EXTRALIBS" "libavutil" -+pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$LIBavformat_EXTRALIBS" "libavcodec libavutil" -+pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$LIBavdevice_EXTRALIBS" "libavcodec libavformat libavutil" - enabled avfilter && -- pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION" -+ pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$LIBavfilter_EXTRALIBS" "libavcodec libavutil libswscale" - enabled postproc && -- pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION" +-pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" +-pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION" -pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION" -+ pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION" "$LIBpostproc_EXTRALIBS" "libavutil" -+pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBswscale_EXTRALIBS" "libavutil" ++pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBavutil_EXTRALIBS" ++pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$LIBavcodec_EXTRALIBS" ++pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$LIBavformat_EXTRALIBS" "libavcodec = $LIBAVCODEC_VERSION" ++pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$LIBavdevice_EXTRALIBS" "libavformat = $LIBAVFORMAT_VERSION" ++pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$LIBavfilter_EXTRALIBS" ++pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION" "$LIBpostproc_EXTRALIBS" ++pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBswscale_EXTRALIBS" "libavutil = $LIBAVUTIL_VERSION" Index: patches/patch-ffplay_c =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-ffplay_c,v retrieving revision 1.2 diff -u -p -u -r1.2 patch-ffplay_c --- patches/patch-ffplay_c 26 May 2010 21:38:52 -0000 1.2 +++ patches/patch-ffplay_c 29 Mar 2011 16:00:43 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-ffplay_c,v 1.2 2010/05/26 21:38:52 jakemsr Exp $ ---- ffplay.c.orig Tue May 11 19:21:00 2010 -+++ ffplay.c Wed May 12 19:43:20 2010 -@@ -2174,7 +2174,7 @@ static int stream_component_open(VideoState *is, int s +--- ffplay.c.orig Sun Mar 6 23:03:48 2011 ++++ ffplay.c Sun Mar 6 23:54:06 2011 +@@ -2198,7 +2198,7 @@ static int stream_component_open(VideoState *is, int s AVFormatContext *ic = is->ic; AVCodecContext *avctx; AVCodec *codec; @@ -10,7 +10,7 @@ $OpenBSD: patch-ffplay_c,v 1.2 2010/05/2 if (stream_index < 0 || stream_index >= ic->nb_streams) return -1; -@@ -2219,11 +2219,11 @@ static int stream_component_open(VideoState *is, int s +@@ -2243,11 +2243,11 @@ static int stream_component_open(VideoState *is, int s wanted_spec.samples = SDL_AUDIO_BUFFER_SIZE; wanted_spec.callback = sdl_audio_callback; wanted_spec.userdata = is; @@ -21,6 +21,6 @@ $OpenBSD: patch-ffplay_c,v 1.2 2010/05/2 } - is->audio_hw_buf_size = spec.size; + is->audio_hw_buf_size = wanted_spec.size; - is->audio_src_fmt= SAMPLE_FMT_S16; + is->audio_src_fmt= AV_SAMPLE_FMT_S16; } Index: patches/patch-libavcodec_Makefile =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libavcodec_Makefile,v retrieving revision 1.18 diff -u -p -u -r1.18 patch-libavcodec_Makefile --- patches/patch-libavcodec_Makefile 26 May 2010 21:38:52 -0000 1.18 +++ patches/patch-libavcodec_Makefile 29 Mar 2011 16:00:43 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-libavcodec_Makefile,v 1.18 2010/05/26 21:38:52 jakemsr Exp $ ---- libavcodec/Makefile.orig Tue May 11 16:20:53 2010 -+++ libavcodec/Makefile Mon May 17 17:57:00 2010 -@@ -623,6 +623,23 @@ CLEANFILES = sin_tables.c cos_tables.c *_tables.h *_ta +--- libavcodec/Makefile.orig Sun Mar 6 23:03:48 2011 ++++ libavcodec/Makefile Mon Mar 7 00:17:28 2011 +@@ -667,6 +667,25 @@ CLEANFILES = sin_tables.c cos_tables.c *_tables.h *_ta include $(SUBDIR)../subdir.mak @@ -13,6 +13,7 @@ $OpenBSD: patch-libavcodec_Makefile,v 1. +libavcodec/x86/snowdsp_mmx.o: CFLAGS += -O +libavcodec/x86/vc1dsp_mmx.o: CFLAGS += -O +libavcodec/x86/vp3dsp_mmx.o: CFLAGS += -O ++libavcodec/x86/mpegaudiodec_mmx.o: CFLAGS += -O +endif +libavcodec/x86/cavsdsp_mmx.o: CFLAGS += -fomit-frame-pointer +libavcodec/x86/dsputil_mmx.o: CFLAGS += -fomit-frame-pointer @@ -20,6 +21,7 @@ $OpenBSD: patch-libavcodec_Makefile,v 1. +libavcodec/x86/snowdsp_mmx.o: CFLAGS += -fomit-frame-pointer +libavcodec/x86/vc1dsp_mmx.o: CFLAGS += -fomit-frame-pointer +libavcodec/x86/vp3dsp_mmx.o: CFLAGS += -fomit-frame-pointer ++libavcodec/x86/mpegaudiodec_mmx.o: CFLAGS += -fomit-frame-pointer +endif + $(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o Index: patches/patch-libavcodec_libfaad_c =================================================================== RCS file: patches/patch-libavcodec_libfaad_c diff -N patches/patch-libavcodec_libfaad_c --- patches/patch-libavcodec_libfaad_c 26 May 2010 21:38:52 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,49 +0,0 @@ -$OpenBSD: patch-libavcodec_libfaad_c,v 1.5 2010/05/26 21:38:52 jakemsr Exp $ ---- libavcodec/libfaad.c.orig Tue May 11 19:20:53 2010 -+++ libavcodec/libfaad.c Wed May 12 19:16:19 2010 -@@ -76,14 +76,14 @@ typedef struct { - #else - unsigned char FAADAPI (*faacDecSetConfiguration)(faacDecHandle hDecoder, - faacDecConfigurationPtr config); -- long FAADAPI (*faacDecInit)(faacDecHandle hDecoder, -+ int FAADAPI (*faacDecInit)(faacDecHandle hDecoder, - unsigned char *buffer, -- unsigned long buffer_size, -- unsigned long *samplerate, -+ unsigned int buffer_size, -+ unsigned int *samplerate, - unsigned char *channels); - char FAADAPI (*faacDecInit2)(faacDecHandle hDecoder, unsigned char *pBuffer, - unsigned long SizeOfDecoderSpecificInfo, -- unsigned long *samplerate, unsigned char *channels); -+ unsigned int *samplerate, unsigned char *channels); - void *FAADAPI (*faacDecDecode)(faacDecHandle hDecoder, - faacDecFrameInfo *hInfo, - unsigned char *buffer, -@@ -120,7 +120,7 @@ static void channel_setup(AVCodecContext *avctx) - static av_cold int faac_init_mp4(AVCodecContext *avctx) - { - FAACContext *s = avctx->priv_data; -- unsigned long samplerate; -+ unsigned int samplerate; - #ifndef FAAD2_VERSION - unsigned long channels; - #else -@@ -134,7 +134,7 @@ static av_cold int faac_init_mp4(AVCodecContext *avctx - &samplerate, &channels); - if (r < 0){ - av_log(avctx, AV_LOG_ERROR, -- "faacDecInit2 failed r:%d sr:%ld ch:%ld s:%d\n", -+ "faacDecInit2 failed r:%d sr:%d ch:%ld s:%d\n", - r, samplerate, (long)channels, avctx->extradata_size); - } else { - avctx->sample_rate = samplerate; -@@ -179,7 +179,7 @@ static int faac_decode_frame(AVCodecContext *avctx, - #else - - if(!s->init){ -- unsigned long srate; -+ unsigned int srate; - unsigned char channels; - int r = s->faacDecInit(s->faac_handle, buf, buf_size, &srate, &channels); - if(r < 0){ Index: patches/patch-libavcodec_vorbis_dec_c =================================================================== RCS file: patches/patch-libavcodec_vorbis_dec_c diff -N patches/patch-libavcodec_vorbis_dec_c --- patches/patch-libavcodec_vorbis_dec_c 12 Feb 2011 10:48:56 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,135 +0,0 @@ -$OpenBSD: patch-libavcodec_vorbis_dec_c,v 1.1 2011/02/12 10:48:56 jasper Exp $ - -Security fixes for CVE-2010-4704, CVE-2010-4705 and CVE-2011-0480. -From upstream git commits: - 3dde66752d59dfdd0f3727efd66e7202b3c75078 - 366d919016a679d3955f6fe5278fa7ce4f47b81e - 13184036a6b1b1d4b61c91118c0896e9ad4634c3 - 925aa96915b8143017cb63418cb709b992c59065 - ---- libavcodec/vorbis_dec.c.orig Wed May 12 01:20:53 2010 -+++ libavcodec/vorbis_dec.c Thu Feb 10 15:00:53 2011 -@@ -61,8 +61,8 @@ typedef struct vorbis_floor0_s vorbis_floor0; - typedef struct vorbis_floor1_s vorbis_floor1; - struct vorbis_context_s; - typedef --uint_fast8_t (* vorbis_floor_decode_func) -- (struct vorbis_context_s *, vorbis_floor_data *, float *); -+int (* vorbis_floor_decode_func) -+ (struct vorbis_context_s *, vorbis_floor_data *, float *); - typedef struct { - uint_fast8_t floor_type; - vorbis_floor_decode_func decode; -@@ -453,11 +453,11 @@ static int vorbis_parse_setup_hdr_tdtransforms(vorbis_ - - // Process floors part - --static uint_fast8_t vorbis_floor0_decode(vorbis_context *vc, -- vorbis_floor_data *vfu, float *vec); -+static int vorbis_floor0_decode(vorbis_context *vc, -+ vorbis_floor_data *vfu, float *vec); - static void create_map(vorbis_context *vc, uint_fast8_t floor_number); --static uint_fast8_t vorbis_floor1_decode(vorbis_context *vc, -- vorbis_floor_data *vfu, float *vec); -+static int vorbis_floor1_decode(vorbis_context *vc, -+ vorbis_floor_data *vfu, float *vec); - static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) - { - GetBitContext *gb = &vc->gb; -@@ -477,6 +477,7 @@ static int vorbis_parse_setup_hdr_floors(vorbis_contex - if (floor_setup->floor_type == 1) { - uint_fast8_t maximum_class = 0; - uint_fast8_t rangebits; -+ uint_fast32_t rangemax; - uint_fast16_t floor1_values = 2; - - floor_setup->decode = vorbis_floor1_decode; -@@ -530,8 +531,15 @@ static int vorbis_parse_setup_hdr_floors(vorbis_contex - - - rangebits = get_bits(gb, 4); -+ rangemax = (1 << rangebits); -+ if (rangemax > vc->blocksize[1] / 2) { -+ av_log(vc->avccontext, AV_LOG_ERROR, -+ "Floor value is too large for blocksize: %d (%d)\n", -+ rangemax, vc->blocksize[1] / 2); -+ return -1; -+ } - floor_setup->data.t1.list[0].x = 0; -- floor_setup->data.t1.list[1].x = (1 << rangebits); -+ floor_setup->data.t1.list[1].x = rangemax; - - for (j = 0; j < floor_setup->data.t1.partitions; ++j) { - for (k = 0; k < floor_setup->data.t1.class_dimensions[floor_setup->data.t1.partition_class[j]]; ++k, ++floor1_values) { -@@ -648,7 +656,7 @@ static int vorbis_parse_setup_hdr_residues(vorbis_cont - res_setup->partition_size = get_bits(gb, 24) + 1; - /* Validations to prevent a buffer overflow later. */ - if (res_setup->begin>res_setup->end || -- res_setup->end>vc->blocksize[1] / (res_setup->type == 2 ? 1 : 2) || -+ res_setup->end > vc->avccontext->channels * vc->blocksize[1] / 2 || - (res_setup->end-res_setup->begin) / res_setup->partition_size > V_MAX_PARTITIONS) { - av_log(vc->avccontext, AV_LOG_ERROR, "partition out of bounds: type, begin, end, size, blocksize: %"PRIdFAST16", %"PRIdFAST32", %"PRIdFAST32", %"PRIdFAST32", %"PRIdFAST32"\n", res_setup->type, res_setup->begin, res_setup->end, res_setup->partition_size, vc->blocksize[1] / 2); - return -1; -@@ -1002,8 +1010,8 @@ static av_cold int vorbis_decode_init(AVCodecContext * - - // Read and decode floor - --static uint_fast8_t vorbis_floor0_decode(vorbis_context *vc, -- vorbis_floor_data *vfu, float *vec) -+static int vorbis_floor0_decode(vorbis_context *vc, -+ vorbis_floor_data *vfu, float *vec) - { - vorbis_floor0 *vf = &vfu->t0; - float *lsp = vf->lsp; -@@ -1027,6 +1035,9 @@ static uint_fast8_t vorbis_floor0_decode(vorbis_contex - } - AV_DEBUG("floor0 dec: booknumber: %u\n", book_idx); - codebook = vc->codebooks[vf->book_list[book_idx]]; -+ /* Invalid codebook! */ -+ if (!codebook.codevectors) -+ return -1; - - while (lsp_len<vf->order) { - int vec_off; -@@ -1112,8 +1123,8 @@ static uint_fast8_t vorbis_floor0_decode(vorbis_contex - return 0; - } - --static uint_fast8_t vorbis_floor1_decode(vorbis_context *vc, -- vorbis_floor_data *vfu, float *vec) -+static int vorbis_floor1_decode(vorbis_context *vc, -+ vorbis_floor_data *vfu, float *vec) - { - vorbis_floor1 *vf = &vfu->t1; - GetBitContext *gb = &vc->gb; -@@ -1257,7 +1268,7 @@ static av_always_inline int vorbis_residue_decode_inte - uint_fast8_t c_p_c = vc->codebooks[vr->classbook].dimensions; - uint_fast16_t n_to_read = vr->end-vr->begin; - uint_fast16_t ptns_to_read = n_to_read/vr->partition_size; -- uint_fast8_t classifs[ptns_to_read*vc->audio_channels]; -+ uint8_t classifs[ptns_to_read*vc->audio_channels]; - uint_fast8_t pass; - uint_fast8_t ch_used; - uint_fast8_t i,j,l; -@@ -1490,13 +1501,20 @@ static int vorbis_parse_audio_packet(vorbis_context *v - - for (i = 0; i < vc->audio_channels; ++i) { - vorbis_floor *floor; -+ int ret; - if (mapping->submaps > 1) { - floor = &vc->floors[mapping->submap_floor[mapping->mux[i]]]; - } else { - floor = &vc->floors[mapping->submap_floor[0]]; - } - -- no_residue[i] = floor->decode(vc, &floor->data, ch_floor_ptr); -+ ret = floor->decode(vc, &floor->data, ch_floor_ptr); -+ -+ if (ret < 0) { -+ av_log(vc->avccontext, AV_LOG_ERROR, "Invalid codebook in vorbis_floor_decode.\n"); -+ return -1; -+ } -+ no_residue[i] = ret; - ch_floor_ptr += blocksize / 2; - } - Index: patches/patch-libavcodec_x86_vp56_arith_h =================================================================== RCS file: patches/patch-libavcodec_x86_vp56_arith_h diff -N patches/patch-libavcodec_x86_vp56_arith_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libavcodec_x86_vp56_arith_h 29 Mar 2011 16:00:43 -0000 @@ -0,0 +1,12 @@ +$OpenBSD$ +--- libavcodec/x86/vp56_arith.h.orig Mon Mar 7 00:53:24 2011 ++++ libavcodec/x86/vp56_arith.h Mon Mar 7 00:53:48 2011 +@@ -24,7 +24,7 @@ + #ifndef AVCODEC_X86_VP56_ARITH_H + #define AVCODEC_X86_VP56_ARITH_H + +-#if HAVE_FAST_CMOV ++#if HAVE_FAST_CMOV && !ARCH_X86_64 + #define vp56_rac_get_prob vp56_rac_get_prob + static av_always_inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob) + { Index: patches/patch-libavdevice_Makefile =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libavdevice_Makefile,v retrieving revision 1.4 diff -u -p -u -r1.4 patch-libavdevice_Makefile --- patches/patch-libavdevice_Makefile 3 Sep 2010 16:39:13 -0000 1.4 +++ patches/patch-libavdevice_Makefile 29 Mar 2011 16:00:43 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-libavdevice_Makefile,v 1.4 2010/09/03 16:39:13 sthen Exp $ ---- libavdevice/Makefile.orig Tue May 11 19:20:57 2010 -+++ libavdevice/Makefile Wed Aug 18 18:30:32 2010 +--- libavdevice/Makefile.orig Sun Mar 6 23:03:49 2011 ++++ libavdevice/Makefile Sun Mar 6 23:42:07 2011 @@ -17,6 +17,8 @@ OBJS-$(CONFIG_DV1394_INDEV) += dv1394.o OBJS-$(CONFIG_JACK_INDEV) += jack_audio.o OBJS-$(CONFIG_OSS_INDEV) += oss_audio.o @@ -10,8 +10,8 @@ $OpenBSD: patch-libavdevice_Makefile,v 1 OBJS-$(CONFIG_V4L2_INDEV) += v4l2.o OBJS-$(CONFIG_V4L_INDEV) += v4l.o OBJS-$(CONFIG_VFWCAP_INDEV) += vfwcap.o -@@ -29,5 +31,6 @@ OBJS-$(CONFIG_AUDIO_BEOS_INDEV) += beosaudio. - OBJS-$(CONFIG_AUDIO_BEOS_OUTDEV) += beosaudio.o +@@ -26,5 +28,6 @@ OBJS-$(CONFIG_X11_GRAB_DEVICE_INDEV) += x11grab.o + OBJS-$(CONFIG_LIBDC1394_INDEV) += libdc1394.o SKIPHEADERS-$(HAVE_ALSA_ASOUNDLIB_H) += alsa-audio.h +SKIPHEADERS-$(HAVE_SNDIO_H) += sndio_common.h Index: patches/patch-libavdevice_alldevices_c =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libavdevice_alldevices_c,v retrieving revision 1.1 diff -u -p -u -r1.1 patch-libavdevice_alldevices_c --- patches/patch-libavdevice_alldevices_c 26 May 2010 21:38:52 -0000 1.1 +++ patches/patch-libavdevice_alldevices_c 29 Mar 2011 16:00:43 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-libavdevice_alldevices_c,v 1.1 2010/05/26 21:38:52 jakemsr Exp $ ---- libavdevice/alldevices.c.orig Sun May 16 10:50:32 2010 -+++ libavdevice/alldevices.c Sun May 16 10:51:04 2010 -@@ -45,6 +45,7 @@ void avdevice_register_all(void) +--- libavdevice/alldevices.c.orig Sun Mar 6 23:03:49 2011 ++++ libavdevice/alldevices.c Sun Mar 6 23:42:07 2011 +@@ -44,6 +44,7 @@ void avdevice_register_all(void) REGISTER_INDEV (DV1394, dv1394); REGISTER_INDEV (JACK, jack); REGISTER_INOUTDEV (OSS, oss); Index: patches/patch-libavfilter_Makefile =================================================================== RCS file: patches/patch-libavfilter_Makefile diff -N patches/patch-libavfilter_Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libavfilter_Makefile 29 Mar 2011 16:00:43 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ +--- libavfilter/Makefile.orig Mon Mar 7 00:18:12 2011 ++++ libavfilter/Makefile Mon Mar 7 00:18:28 2011 +@@ -62,3 +62,10 @@ OBJS-$(CONFIG_NULLSINK_FILTER) += vsink_ + DIRS = x86 + + include $(SUBDIR)../subdir.mak ++ ++ifdef ARCH_X86_32 ++ifeq (,$(findstring -O,$(CFLAGS))) ++libavfilter/x86/gradfun.o: CFLAGS += -O ++endif ++libavfilter/x86/gradfun.o: CFLAGS += -fomit-frame-pointer ++endif Index: patches/patch-libavutil_common_h =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-libavutil_common_h,v retrieving revision 1.2 diff -u -p -u -r1.2 patch-libavutil_common_h --- patches/patch-libavutil_common_h 3 Sep 2010 16:39:13 -0000 1.2 +++ patches/patch-libavutil_common_h 29 Mar 2011 16:00:43 -0000 @@ -1,21 +1,14 @@ $OpenBSD: patch-libavutil_common_h,v 1.2 2010/09/03 16:39:13 sthen Exp $ ---- libavutil/common.h.orig Tue May 11 19:20:40 2010 -+++ libavutil/common.h Thu Aug 19 21:54:13 2010 -@@ -35,6 +35,17 @@ - #include <stdlib.h> - #include <string.h> - #include "attributes.h" -+#include "avconfig.h" -+ -+#if AV_HAVE_BIGENDIAN -+# define AV_NE(be, le) be -+#else -+# define AV_NE(be, le) le -+#endif -+ +--- libavutil/common.h.orig Sun Mar 6 23:03:50 2011 ++++ libavutil/common.h Sun Mar 6 23:45:11 2011 +@@ -43,6 +43,10 @@ + # define AV_NE(be, le) (le) + #endif + +#ifndef UINT64_C -+#define UINT64_C(_c) __CONCAT(_c, ULL) ++#define UINT64_C(_c) __CONCAT(_c, ULL) +#endif - ++ //rounded division & shift #define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b)) + /* assume b>0 */ Index: patches/patch-version_sh =================================================================== RCS file: patches/patch-version_sh diff -N patches/patch-version_sh --- patches/patch-version_sh 26 May 2010 21:38:52 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,30 +0,0 @@ -$OpenBSD: patch-version_sh,v 1.4 2010/05/26 21:38:52 jakemsr Exp $ ---- version.sh.orig Tue May 11 19:21:00 2010 -+++ version.sh Wed May 12 19:55:32 2010 -@@ -1,14 +1,19 @@ - #!/bin/sh - - # check for SVN revision number --revision=$(cd "$1" && cat snapshot_version 2> /dev/null) --test $revision || revision=$(cd "$1" && LC_ALL=C svn info 2> /dev/null | grep "Last Changed Rev" | cut -d' ' -f4) --test $revision || revision=$(cd "$1" && grep committed-rev .svn/entries 2>/dev/null | head -n 1 | cut -d '"' -f2) --test $revision || revision=$(cd "$1" && sed -n -e '/^dir$/{n --p --q --}' .svn/entries 2>/dev/null) -+#revision=$(cd "$1" && cat snapshot_version 2> /dev/null) -+#test $revision || revision=$(cd "$1" && LC_ALL=C svn info 2> /dev/null | grep "Last Changed Rev" | cut -d' ' -f4) -+#test $revision || revision=$(cd "$1" && grep committed-rev .svn/entries 2>/dev/null | head -n 1 | cut -d '"' -f2) -+#test $revision || revision=$(cd "$1" && sed -n -e '/^dir$/{n -+#p -+#q -+#}' .svn/entries 2>/dev/null) -+#test $revision && revision=SVN-r$revision -+ -+revision=`cd "$1" && grep Revision svn-info | \ -+ cut -d' ' -f2 2> /dev/null` - test $revision && revision=SVN-r$revision -+test $revision || revision=UNKNOWN - - # check for git svn revision number - if ! test $revision; then Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/pkg/PLIST,v retrieving revision 1.17 diff -u -p -u -r1.17 PLIST --- pkg/PLIST 26 May 2010 21:38:52 -0000 1.17 +++ pkg/PLIST 29 Mar 2011 16:00:43 -0000 @@ -17,29 +17,44 @@ include/libavdevice/ include/libavdevice/avdevice.h include/libavfilter/ include/libavfilter/avfilter.h +include/libavfilter/avfiltergraph.h include/libavformat/ include/libavformat/avformat.h include/libavformat/avio.h +include/libavformat/version.h include/libavutil/ include/libavutil/adler32.h include/libavutil/attributes.h +include/libavutil/audioconvert.h +include/libavutil/avassert.h include/libavutil/avconfig.h include/libavutil/avstring.h include/libavutil/avutil.h include/libavutil/base64.h +include/libavutil/bswap.h include/libavutil/common.h +include/libavutil/cpu.h include/libavutil/crc.h include/libavutil/error.h +include/libavutil/eval.h include/libavutil/fifo.h +include/libavutil/file.h +include/libavutil/imgutils.h include/libavutil/intfloat_readwrite.h +include/libavutil/intreadwrite.h +include/libavutil/lfg.h include/libavutil/log.h include/libavutil/lzo.h include/libavutil/mathematics.h include/libavutil/md5.h include/libavutil/mem.h +include/libavutil/opt.h +include/libavutil/parseutils.h include/libavutil/pixdesc.h include/libavutil/pixfmt.h +include/libavutil/random_seed.h include/libavutil/rational.h +include/libavutil/samplefmt.h include/libavutil/sha1.h include/libpostproc/ include/libpostproc/postprocess.h @@ -67,23 +82,20 @@ lib/pkgconfig/libswscale.pc share/doc/ffmpeg/ share/doc/ffmpeg/developer.html share/doc/ffmpeg/faq.html -share/doc/ffmpeg/ffmpeg-doc.html -share/doc/ffmpeg/ffplay-doc.html -share/doc/ffmpeg/ffprobe-doc.html -share/doc/ffmpeg/ffserver-doc.html +share/doc/ffmpeg/ffmpeg.html +share/doc/ffmpeg/ffplay.html +share/doc/ffmpeg/ffprobe.html +share/doc/ffmpeg/ffserver.html share/doc/ffmpeg/general.html share/doc/ffmpeg/libavfilter.html share/examples/ffmpeg/ share/examples/ffmpeg/ffserver.conf share/ffmpeg/ share/ffmpeg/libx264-baseline.ffpreset -share/ffmpeg/libx264-default.ffpreset share/ffmpeg/libx264-fast.ffpreset share/ffmpeg/libx264-fast_firstpass.ffpreset share/ffmpeg/libx264-faster.ffpreset share/ffmpeg/libx264-faster_firstpass.ffpreset -share/ffmpeg/libx264-fastfirstpass.ffpreset -share/ffmpeg/libx264-hq.ffpreset share/ffmpeg/libx264-ipod320.ffpreset share/ffmpeg/libx264-ipod640.ffpreset share/ffmpeg/libx264-lossless_fast.ffpreset @@ -93,17 +105,14 @@ share/ffmpeg/libx264-lossless_slow.ffpre share/ffmpeg/libx264-lossless_slower.ffpreset share/ffmpeg/libx264-lossless_ultrafast.ffpreset share/ffmpeg/libx264-main.ffpreset -share/ffmpeg/libx264-max.ffpreset share/ffmpeg/libx264-medium.ffpreset share/ffmpeg/libx264-medium_firstpass.ffpreset -share/ffmpeg/libx264-normal.ffpreset share/ffmpeg/libx264-placebo.ffpreset share/ffmpeg/libx264-placebo_firstpass.ffpreset share/ffmpeg/libx264-slow.ffpreset share/ffmpeg/libx264-slow_firstpass.ffpreset share/ffmpeg/libx264-slower.ffpreset share/ffmpeg/libx264-slower_firstpass.ffpreset -share/ffmpeg/libx264-slowfirstpass.ffpreset share/ffmpeg/libx264-superfast.ffpreset share/ffmpeg/libx264-superfast_firstpass.ffpreset share/ffmpeg/libx264-ultrafast.ffpreset -- Best Regards Edd Barrett http://www.theunixzoo.co.uk