Update to ffmpeg-20120422 (0.7 branch).

* fix a whole lot of security related issues and bugs

from Brad (maintainer)
This commit is contained in:
ajacoutot 2012-04-28 08:41:32 +00:00
parent f2c437ed01
commit cd8cba8102
6 changed files with 63 additions and 55 deletions

View File

@ -1,22 +1,21 @@
# $OpenBSD: Makefile,v 1.85 2012/04/08 16:56:51 ajacoutot Exp $ # $OpenBSD: Makefile,v 1.86 2012/04/28 08:41:32 ajacoutot Exp $
COMMENT= audio/video converter and streamer COMMENT= audio/video converter and streamer
V= 20111126 V= 20120422
DISTNAME= ffmpeg-git-${V} DISTNAME= ffmpeg-git-${V}
PKGNAME= ffmpeg-${V} PKGNAME= ffmpeg-${V}
REVISION= 0
CATEGORIES= graphics multimedia CATEGORIES= graphics multimedia
MASTER_SITES= http://comstyle.com/source/ MASTER_SITES= http://comstyle.com/source/
EXTRACT_SUFX= .tar.bz2 EXTRACT_SUFX= .tar.bz2
SHARED_LIBS= avcodec 16.2 \ SHARED_LIBS= avcodec 17.0 \
avdevice 4.1 \ avdevice 5.0 \
avfilter 2.2 \ avfilter 3.0 \
avformat 14.2 \ avformat 15.0 \
avutil 8.2 \ avutil 9.0 \
postproc 14.0 \ postproc 14.0 \
swscale 3.2 swscale 4.0
HOMEPAGE= http://ffmpeg.org/ HOMEPAGE= http://ffmpeg.org/
@ -67,11 +66,6 @@ FFMPEG_ARCH= generic
FFMPEG_ARCH= ${MACHINE_ARCH} FFMPEG_ARCH= ${MACHINE_ARCH}
.endif .endif
OPTFLAGS= ${CFLAGS}
# until the system headers are fixed properly.
OPTFLAGS+= -Wno-redundant-decls
USE_GMAKE= Yes USE_GMAKE= Yes
CONFIGURE_STYLE= simple CONFIGURE_STYLE= simple
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \ CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
@ -103,8 +97,7 @@ CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
--enable-x11grab \ --enable-x11grab \
--extra-cflags="-I${LOCALBASE}/include -I${X11BASE}/include" \ --extra-cflags="-I${LOCALBASE}/include -I${X11BASE}/include" \
--extra-libs="-L${LOCALBASE}/lib -L${X11BASE}/lib" \ --extra-libs="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
--mandir=${PREFIX}/man \ --mandir=${PREFIX}/man
--optflags="${OPTFLAGS}"
CONFIGURE_ENV+= LIBavcodec_EXTRALIBS="${LIBavcodec_EXTRALIBS}" \ CONFIGURE_ENV+= LIBavcodec_EXTRALIBS="${LIBavcodec_EXTRALIBS}" \
LIBavdevice_EXTRALIBS="${LIBavdevice_EXTRALIBS}" \ LIBavdevice_EXTRALIBS="${LIBavdevice_EXTRALIBS}" \

View File

@ -1,5 +1,5 @@
MD5 (ffmpeg-git-20111126.tar.bz2) = 8wE3eHPiBIVeKeC28Jfgpg== MD5 (ffmpeg-git-20120422.tar.bz2) = FIvZR59fVAYWfyYA3SibHQ==
RMD160 (ffmpeg-git-20111126.tar.bz2) = 82Jpr5wP9s3edVjXrKPNB/+Yfo8= RMD160 (ffmpeg-git-20120422.tar.bz2) = EFkAKIN6d6XvX/rVL4A+cDSeGNc=
SHA1 (ffmpeg-git-20111126.tar.bz2) = nodItiAZOLJ9N3HOPH7nPoxYSEM= SHA1 (ffmpeg-git-20120422.tar.bz2) = 3ivLDfdrywb5n9fu4DyVyeCwIlg=
SHA256 (ffmpeg-git-20111126.tar.bz2) = LVfk+XnuoYk0wNqCebPHgCUC1ioprRQcpcO6Dfl9wlE= SHA256 (ffmpeg-git-20120422.tar.bz2) = zbO5f21FhD+X1HgeIsdFbCPNgOswuIqHhx2iZXgAVyc=
SIZE (ffmpeg-git-20111126.tar.bz2) = 4500115 SIZE (ffmpeg-git-20120422.tar.bz2) = 4488962

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-configure,v 1.28 2011/12/30 17:34:39 edd Exp $ $OpenBSD: patch-configure,v 1.29 2012/04/28 08:41:32 ajacoutot Exp $
--- configure.orig Thu Sep 22 14:48:24 2011 --- configure.orig Sat Apr 21 23:53:38 2012
+++ configure Thu Sep 22 23:08:31 2011 +++ configure Sun Apr 22 00:50:49 2012
@@ -1093,7 +1093,6 @@ HAVE_LIST=" @@ -1092,7 +1092,6 @@ HAVE_LIST="
lzo1x_999_compress lzo1x_999_compress
machine_ioctl_bt848_h machine_ioctl_bt848_h
machine_ioctl_meteor_h machine_ioctl_meteor_h
@ -9,16 +9,15 @@ $OpenBSD: patch-configure,v 1.28 2011/12/30 17:34:39 edd Exp $
MapViewOfFile MapViewOfFile
memalign memalign
mkstemp mkstemp
@@ -2413,6 +2412,8 @@ case $target_os in @@ -2425,6 +2424,7 @@ case $target_os in
enable pic enable pic
disable symver disable symver
SHFLAGS='-shared' SHFLAGS='-shared'
+ SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBVERSION)' + SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBVERSION)'
+ SLIB_INSTALL_LINKS=
oss_indev_extralibs="-lossaudio" oss_indev_extralibs="-lossaudio"
oss_outdev_extralibs="-lossaudio" oss_outdev_extralibs="-lossaudio"
;; ;;
@@ -2591,7 +2592,7 @@ die_license_disabled version3 libvo_amrwbenc @@ -2601,7 +2601,7 @@ die_license_disabled version3 libvo_amrwbenc
enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; } enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; }
@ -27,7 +26,7 @@ $OpenBSD: patch-configure,v 1.28 2011/12/30 17:34:39 edd Exp $
enable_pic() { enable_pic() {
enable pic enable pic
@@ -2772,8 +2773,6 @@ if enabled asm; then @@ -2797,8 +2797,6 @@ if enabled asm; then
$nogas "GNU assembler not found, install gas-preprocessor" $nogas "GNU assembler not found, install gas-preprocessor"
fi fi
@ -36,7 +35,7 @@ $OpenBSD: patch-configure,v 1.28 2011/12/30 17:34:39 edd Exp $
if check_func dlopen; then if check_func dlopen; then
ldl= ldl=
elif check_func dlopen -ldl; then elif check_func dlopen -ldl; then
@@ -2906,7 +2905,7 @@ enabled libdirac && require_pkg_config dirac @@ -2931,7 +2929,7 @@ enabled libdirac && require_pkg_config dirac
"dirac_decoder_init dirac_encoder_init" "dirac_decoder_init dirac_encoder_init"
enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType
@ -45,15 +44,26 @@ $OpenBSD: patch-configure,v 1.28 2011/12/30 17:34:39 edd Exp $
enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame 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 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 enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
@@ -3038,7 +3037,6 @@ enabled extra_warnings && check_cflags -Winline @@ -3057,7 +3055,6 @@ enabled extra_warnings && check_cflags -Winline
# add some linker flags # add some linker flags
check_ldflags -Wl,--warn-common check_ldflags -Wl,--warn-common
-check_ldflags -Wl,-rpath-link=libpostproc:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil -check_ldflags -Wl,-rpath-link,libpostproc -Wl,-rpath-link,libswscale -Wl,-rpath-link,libavfilter -Wl,-rpath-link,libavdevice -Wl,-rpath-link,libavformat -Wl,-rpath-link,libavcodec -Wl,-rpath-link,libavutil
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
echo "X{};" > $TMPV echo "X{};" > $TMPV
@@ -3465,8 +3463,7 @@ Version: $version @@ -3075,10 +3072,6 @@ fi
if enabled small; then
add_cflags $size_cflags
-elif enabled optimizations; then
- add_cflags $speed_cflags
-else
- add_cflags $noopt_cflags
fi
check_cflags -fno-math-errno
check_cflags -fno-signed-zeros
@@ -3519,8 +3512,7 @@ Version: $version
Requires: $(enabled shared || echo $requires) Requires: $(enabled shared || echo $requires)
Requires.private: $(enabled shared && echo $requires) Requires.private: $(enabled shared && echo $requires)
Conflicts: Conflicts:
@ -63,7 +73,7 @@ $OpenBSD: patch-configure,v 1.28 2011/12/30 17:34:39 edd Exp $
Cflags: -I\${includedir} Cflags: -I\${includedir}
EOF EOF
cat <<EOF > $name/$name-uninstalled.pc cat <<EOF > $name/$name-uninstalled.pc
@@ -3485,10 +3482,10 @@ Cflags: -I\${includedir} @@ -3539,10 +3531,10 @@ Cflags: -I\${includedir}
EOF EOF
} }
@ -72,7 +82,7 @@ $OpenBSD: patch-configure,v 1.28 2011/12/30 17:34:39 edd Exp $
-pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION" -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 libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
-pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" -pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs"
-pkgconfig_generate libpostproc "FFmpeg postprocessing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION" -pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
-pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION" -pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
+pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBavutil_EXTRALIBS" +pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBavutil_EXTRALIBS"
+pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$LIBavcodec_EXTRALIBS" "libavutil" +pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$LIBavcodec_EXTRALIBS" "libavutil"

View File

@ -1,16 +1,16 @@
$OpenBSD: patch-ffplay_c,v 1.5 2011/12/30 17:34:39 edd Exp $ $OpenBSD: patch-ffplay_c,v 1.6 2012/04/28 08:41:32 ajacoutot Exp $
--- ffplay.c.orig Tue Aug 30 19:59:43 2011 --- ffplay.c.orig Sat Apr 21 23:53:38 2012
+++ ffplay.c Tue Aug 30 20:25:16 2011 +++ ffplay.c Sun Apr 22 00:45:39 2012
@@ -2110,7 +2110,7 @@ static int stream_component_open(VideoState *is, int s @@ -2114,7 +2114,7 @@ static int stream_component_open(VideoState *is, int s
AVFormatContext *ic = is->ic; AVFormatContext *ic = is->ic;
AVCodecContext *avctx; AVCodecContext *avctx;
AVCodec *codec; AVCodec *codec;
- SDL_AudioSpec wanted_spec, spec; - SDL_AudioSpec wanted_spec, spec;
+ SDL_AudioSpec wanted_spec; + SDL_AudioSpec wanted_spec;
AVDictionary *opts;
AVDictionaryEntry *t = NULL;
@@ -2169,11 +2169,11 @@ static int stream_component_open(VideoState *is, int s if (stream_index < 0 || stream_index >= ic->nb_streams)
return -1;
@@ -2171,11 +2171,11 @@ static int stream_component_open(VideoState *is, int s
wanted_spec.samples = SDL_AUDIO_BUFFER_SIZE; wanted_spec.samples = SDL_AUDIO_BUFFER_SIZE;
wanted_spec.callback = sdl_audio_callback; wanted_spec.callback = sdl_audio_callback;
wanted_spec.userdata = is; wanted_spec.userdata = is;

View File

@ -1,20 +1,24 @@
$OpenBSD: patch-subdir_mak,v 1.4 2011/12/30 17:34:39 edd Exp $ $OpenBSD: patch-subdir_mak,v 1.5 2012/04/28 08:41:32 ajacoutot Exp $
--- subdir.mak.orig Tue Aug 30 19:57:43 2011 --- subdir.mak.orig Sat Apr 21 23:53:40 2012
+++ subdir.mak Tue Aug 30 20:51:57 2011 +++ subdir.mak Sun Apr 22 00:47:52 2012
@@ -42,7 +42,7 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) @@ -41,7 +41,7 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver
$(SLIB_CREATE_DEF_CMD) $(SLIB_CREATE_DEF_CMD)
- $$(LD) $(SHFLAGS) $(LDFLAGS) -o $$@ $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS) - $$(LD) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
+ $$(LD) $(SHFLAGS) $(LDFLAGS) -o $$@ $$(filter %.o,$$^) $(LIB$(NAME)_EXTRALIBS) $(EXTRAOBJS) + $$(LD) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$(filter %.o,$$^) $(LIB$(NAME)_EXTRALIBS) $(EXTRAOBJS)
$(SLIB_EXTRA_CMD) $(SLIB_EXTRA_CMD)
ifdef SUBDIR ifdef SUBDIR
@@ -61,7 +61,6 @@ distclean:: clean @@ -60,11 +60,6 @@ distclean:: clean
install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME) install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
$(Q)mkdir -p "$(SHLIBDIR)" $(Q)mkdir -p "$(SHLIBDIR)"
$$(INSTALL) -m 755 $$< "$(SHLIBDIR)/$(SLIB_INSTALL_NAME)" $$(INSTALL) -m 755 $$< "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
- $$(STRIP) "$(SHLIBDIR)/$(SLIB_INSTALL_NAME)" - $$(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
$(Q)$(foreach F,$(SLIB_INSTALL_LINKS),cd "$(SHLIBDIR)" && $(LN_S) $(SLIB_INSTALL_NAME) $(F);) - $(Q)cd "$(SHLIBDIR)" && \
$(if $(SLIB_INSTALL_EXTRA_SHLIB),$$(INSTALL) -m 644 $(SLIB_INSTALL_EXTRA_SHLIB:%=$(SUBDIR)%) "$(SHLIBDIR)") - $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
$(if $(SLIB_INSTALL_EXTRA_LIB),$(Q)mkdir -p "$(LIBDIR)") - $(Q)cd "$(SHLIBDIR)" && \
- $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME)
$(SLIB_INSTALL_EXTRA_CMD)
install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME)

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.21 2011/12/30 17:34:39 edd Exp $ @comment $OpenBSD: PLIST,v 1.22 2012/04/28 08:41:32 ajacoutot Exp $
%%SHARED%% %%SHARED%%
@bin bin/ffmpeg @bin bin/ffmpeg
@bin bin/ffplay @bin bin/ffplay
@ -104,6 +104,7 @@ share/ffmpeg/libvpx-1080p50_60.ffpreset
share/ffmpeg/libvpx-360p.ffpreset share/ffmpeg/libvpx-360p.ffpreset
share/ffmpeg/libvpx-720p.ffpreset share/ffmpeg/libvpx-720p.ffpreset
share/ffmpeg/libvpx-720p50_60.ffpreset share/ffmpeg/libvpx-720p50_60.ffpreset
share/ffmpeg/libx264-baseline.ffpreset
share/ffmpeg/libx264-ipod320.ffpreset share/ffmpeg/libx264-ipod320.ffpreset
share/ffmpeg/libx264-ipod640.ffpreset share/ffmpeg/libx264-ipod640.ffpreset
share/ffmpeg/libx264-lossless_fast.ffpreset share/ffmpeg/libx264-lossless_fast.ffpreset