Author: rathann
Update of /cvs/free/rpms/ffmpeg/F-9
In directory se02.es.rpmfusion.net:/tmp/cvs-serv18681
Modified Files:
ffmpeg.spec
Added Files:
ffmpeg-cmov.patch ffmpeg-r16802.patch ffmpeg-r16846.patch
Log Message:
* Sat Jan 31 2009 Dominik Mierzejewski <rpm at greysector.net> -
0.4.9-0.49.20080908
- drop unnecessary patch
- change the lib split on x86, it doesn't work right for P3/AthlonXP
- enable bzlib and dirac support via external libs
- sort BR list alphabetically
- fix a couple of exploitable and potentially exploitable vulnerabilities, including
http://www.trapkit.de/advisories/TKADV2009-004.txt
- add obsoletes for -compat package (RPMFusion bug #173)
- reworked build system
- build optimized versions where it makes sense
- specfile cleanups
- enable yasm for optimized asm routines on x86_32
- add obsoletes for Freshrpms' libpostproc subpackage
ffmpeg-cmov.patch:
--- NEW FILE ffmpeg-cmov.patch ---
diff -up ffmpeg-20080908/configure.cmov ffmpeg-20080908/configure
--- ffmpeg-20080908/configure.cmov 2008-11-01 16:23:33.000000000 +0100
+++ ffmpeg-20080908/configure 2008-11-01 16:23:33.000000000 +0100
@@ -1148,6 +1148,8 @@ case "$arch" in
;;
x86_64|amd64)
arch="x86_32"
+ enable cmov
+ enable fast_cmov
enable fast_unaligned
check_cc <<EOF && enable fast_64bit &&
arch="x86_64"
int test[sizeof(char*) - 7];
ffmpeg-r16802.patch:
--- NEW FILE ffmpeg-r16802.patch ---
diff -up ffmpeg-20080908/libavcodec/indeo3.c.orig ffmpeg-20080908/libavcodec/indeo3.c
--- ffmpeg-20080908/libavcodec/indeo3.c.orig 2008-06-12 23:50:13.000000000 +0200
+++ ffmpeg-20080908/libavcodec/indeo3.c 2009-01-29 21:15:18.000000000 +0100
@@ -348,6 +348,10 @@ static void iv_Decode_Chunk(Indeo3Decode
if(cmd == 0) {
strip++;
+ if(strip >= strip_tbl + FF_ARRAY_ELEMS(strip_tbl)) {
+ av_log(s->avctx, AV_LOG_WARNING, "out of range strip\n");
+ break;
+ }
memcpy(strip, strip-1, sizeof(ustr_t));
strip->split_flag = 1;
strip->split_direction = 0;
@@ -355,6 +359,10 @@ static void iv_Decode_Chunk(Indeo3Decode
continue;
} else if(cmd == 1) {
strip++;
+ if(strip >= strip_tbl + FF_ARRAY_ELEMS(strip_tbl)) {
+ av_log(s->avctx, AV_LOG_WARNING, "out of range strip\n");
+ break;
+ }
memcpy(strip, strip-1, sizeof(ustr_t));
strip->split_flag = 1;
strip->split_direction = 1;
diff -up ffmpeg-20080908/libavutil/common.h.orig ffmpeg-20080908/libavutil/common.h
--- ffmpeg-20080908/libavutil/common.h.orig 2008-08-31 09:39:47.000000000 +0200
+++ ffmpeg-20080908/libavutil/common.h 2009-01-30 01:13:07.000000000 +0100
@@ -116,6 +116,7 @@
#define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c)
#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
+#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
/* misc math functions */
extern const uint8_t ff_log2_tab[256];
ffmpeg-r16846.patch:
--- NEW FILE ffmpeg-r16846.patch ---
diff -up ffmpeg-20080908/libavformat/4xm.c.orig ffmpeg-20080908/libavformat/4xm.c
--- ffmpeg-20080908/libavformat/4xm.c.orig 2008-06-03 18:20:54.000000000 +0200
+++ ffmpeg-20080908/libavformat/4xm.c 2009-01-29 21:19:17.000000000 +0100
@@ -163,10 +163,10 @@ static int fourxm_read_header(AVFormatCo
return AVERROR_INVALIDDATA;
}
current_track = AV_RL32(&header[i + 8]);
+ if((unsigned)fourxm->track_count >= UINT_MAX / sizeof(AudioTrack))
+ return -1;
if (current_track + 1 > fourxm->track_count) {
fourxm->track_count = current_track + 1;
- if((unsigned)fourxm->track_count >= UINT_MAX / sizeof(AudioTrack))
- return -1;
fourxm->tracks = av_realloc(fourxm->tracks,
fourxm->track_count * sizeof(AudioTrack));
if (!fourxm->tracks) {
Index: ffmpeg.spec
===================================================================
RCS file: /cvs/free/rpms/ffmpeg/F-9/ffmpeg.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ffmpeg.spec 17 Sep 2008 22:57:37 -0000 1.3
+++ ffmpeg.spec 31 Jan 2009 13:14:07 -0000 1.4
@@ -6,31 +6,38 @@
Summary: Digital VCR and streaming server
Name: ffmpeg
Version: 0.4.9
-Release: 0.48.%{svn}%{?dist}
+Release: 0.49.%{svn}%{?dist}
License: GPLv2+
Group: Applications/Multimedia
URL:
http://ffmpeg.org/
Source0:
http://rpm.greysector.net/livna/%{name}-%{svn}.tar.bz2
Source1: %{name}-snapshot.sh
+Patch1: %{name}-cmov.patch
Patch4: %{name}-asmreg.patch
+Patch10: %{name}-r16802.patch
+Patch11: %{name}-r16846.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%{?_with_amr:BuildRequires: amrnb-devel amrwb-devel}
-BuildRequires: zlib-devel
+BuildRequires: bzip2-devel
+BuildRequires: faac-devel
+BuildRequires: faad2-devel >= %{faad2min}
+BuildRequires: gsm-devel
+BuildRequires: imlib2-devel
BuildRequires: lame-devel
BuildRequires: libdc1394-devel
-BuildRequires: libvorbis-devel
BuildRequires: libtheora-devel
-BuildRequires: faad2-devel >= %{faad2min}
-BuildRequires: xvidcore-devel
+BuildRequires: libvorbis-devel
+BuildRequires: schroedinger-devel
BuildRequires: SDL-devel
-BuildRequires: gsm-devel
-BuildRequires: imlib2-devel
BuildRequires: texi2html
-BuildRequires: faac-devel
BuildRequires: x264-devel >= 0.0.0-0.14.20080613
-#don't enable until PIC issues on x86_64 are fixed ('ff_imdct_half_sse' in
libavcodec/i386/fft_sse.c)
-#BuildRequires: yasm
+BuildRequires: xvidcore-devel
+BuildRequires: zlib-devel
+#don't enable on x86_64 until PIC issues on are fixed (in
libavcodec/i386/fft_mmx.asm)
+%ifarch %{ix86}
+BuildRequires: yasm
+%endif
%description
FFMpeg is a complete and free Internet live audio and video
@@ -42,6 +49,8 @@
Summary: Libraries for %{name}
Group: System Environment/Libraries
Requires: faad2-libs >= %{faad2min}
+Obsoletes: ffmpeg-libpostproc < 0.4.9-0.11
+Obsoletes: ffmpeg-compat < 0.4.9-0.49
%description libs
FFMpeg is a complete and free Internet live audio and video
@@ -63,50 +72,128 @@
and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.
This package contains development files for %{name}
+%define ff_configure \
+../configure \\\
+ --prefix=%{_prefix} \\\
+ --incdir=%{_includedir}/ffmpeg \\\
+ --libdir=%{_libdir} \\\
+ --mandir=%{_mandir} \\\
+ --arch=%{_target_cpu} \\\
+ --extra-cflags="$RPM_OPT_FLAGS" \\\
+ %{?_with_amr:--enable-libamr-nb --enable-libamr-wb --enable-nonfree} \\\
+ --enable-bzlib \\\
+ --enable-libdc1394 \\\
+ --enable-libfaac \\\
+ --enable-libfaad \\\
+ --enable-libgsm \\\
+ --enable-libmp3lame \\\
+ --enable-libschroedinger \\\
+ --enable-libtheora \\\
+ --enable-libvorbis \\\
+ --enable-libx264 \\\
+ --enable-libxvid \\\
+ --enable-x11grab \\\
+ --enable-avfilter \\\
+ --enable-avfilter-lavf \\\
+ --enable-postproc \\\
+ --enable-swscale \\\
+ --enable-pthreads \\\
+ --disable-static \\\
+ --enable-shared \\\
+ --enable-gpl \\\
+ --disable-debug \\\
+ --disable-optimizations \\\
+ --disable-stripping
+
%prep
%setup -q -n %{name}-%{svn}
+%patch1 -p1 -b .cmov
%patch4 -p1 -b .asmreg
-
+%patch10 -p1
+%patch11 -p1
%build
-./configure \
- --prefix=%{_prefix} \
- --incdir=%{_includedir}/ffmpeg \
- --libdir=%{_libdir} \
+mkdir generic
+pushd generic
+%{ff_configure}\
--shlibdir=%{_libdir} \
- --mandir=%{_mandir} \
- --arch=%{_target_cpu} \
- --extra-cflags="$RPM_OPT_FLAGS -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fasm
-std=c99 -fno-math-errno" \
- %{?_with_amr:--enable-libamr-nb --enable-libamr-wb --enable-nonfree} \
- --enable-libdc1394 \
- --enable-libfaac \
- --enable-libfaad \
- --enable-libgsm \
- --enable-libmp3lame \
- --enable-libtheora \
- --enable-libvorbis \
- --enable-libx264 \
- --enable-libxvid \
- --enable-x11grab \
- --enable-avfilter \
- --enable-avfilter-lavf \
- --enable-postproc \
- --enable-swscale \
- --enable-pthreads \
- --disable-static \
- --enable-shared \
- --enable-gpl \
- --disable-debug \
- --disable-optimizations \
- --disable-stripping
-
-make %{?_smp_mflags}
-
+%ifarch %{ix86}
+ --cpu=%{_target_cpu} \
+%endif
+%ifarch ppc ppc64
+ --disable-altivec \
+%endif
+%ifarch sparc sparc64
+ --disable-vis \
+%endif
+
+make %{?_smp_mflags}
+popd
+
+mkdir simd
+pushd simd
+%ifarch %{ix86}
+%{ff_configure}\
+ --shlibdir=%{_libdir}/i686 \
+ --cpu=i686 \
+ --disable-ffmpeg \
+ --disable-ffserver \
+ --disable-ffplay \
+
+make %{?_smp_mflags}
+%endif
+%ifarch ppc
+%{ff_configure}\
+ --shlibdir=%{_libdir}/altivec \
+ --cpu=g4 \
+ --enable-altivec \
+ --disable-ffmpeg \
+ --disable-ffserver \
+ --disable-ffplay \
+
+make %{?_smp_mflags}
+%endif
+%ifarch ppc64
+%{ff_configure}\
+ --shlibdir=%{_libdir}/altivec \
+ --cpu=g5 \
+ --enable-altivec \
+ --disable-ffmpeg \
+ --disable-ffserver \
+ --disable-ffplay \
+
+make %{?_smp_mflags}
+%endif
+%ifarch sparc sparc64
+%{ff_configure}\
+ --shlibdir=%{_libdir}/v9 \
+ --cpu=v9 \
+ --enable-vis \
+ --disable-ffmpeg \
+ --disable-ffserver \
+ --disable-ffplay \
+
+make %{?_smp_mflags}
+%endif
+popd
%install
rm -rf $RPM_BUILD_ROOT __doc
+pushd generic
make install DESTDIR=$RPM_BUILD_ROOT
+popd
+pushd simd
+%ifarch %{ix86}
+make install DESTDIR=$RPM_BUILD_ROOT
+%endif
+%ifarch ppc ppc64
+make install DESTDIR=$RPM_BUILD_ROOT
+%endif
+%ifarch sparc sparc64
+make install DESTDIR=$RPM_BUILD_ROOT
+%endif
+popd
cp -a doc __doc
rm -f __doc/{Makefile,*.{1,pl,texi}}
@@ -119,7 +206,6 @@
%postun libs -p /sbin/ldconfig
-
%files
%defattr(-,root,root,-)
%doc COPYING.GPL CREDITS Changelog README __doc/*.*
@@ -133,36 +219,52 @@
%files libs
%defattr(-,root,root,-)
-%{_libdir}/libavcodec.so.*
-%{_libdir}/libavdevice.so.*
-%{_libdir}/libavfilter.so.*
-%{_libdir}/libavformat.so.*
-%{_libdir}/libavutil.so.*
-%{_libdir}/libpostproc.so.*
-%{_libdir}/libswscale.so.*
+%{_libdir}/lib*.so.*
%{_libdir}/vhook/
+%ifarch %{ix86}
+%{_libdir}/i686/lib*.so.*
+%{_libdir}/i686/vhook/
+%endif
+%ifarch ppc ppc64
+%{_libdir}/altivec/lib*.so.*
+%{_libdir}/altivec/vhook/
+%endif
+%ifarch sparc sparc64
+%{_libdir}/v9/lib*.so.*
+%{_libdir}/v9/vhook/
+%endif
%files devel
%defattr(-,root,root,-)
-# Note: as of 20070204, --incdir doesn't affect postproc.
%{_includedir}/ffmpeg
-%{_libdir}/libavcodec.so
-%{_libdir}/libavdevice.so
-%{_libdir}/libavfilter.so
-%{_libdir}/libavformat.so
-%{_libdir}/libavutil.so
-%{_libdir}/libpostproc.so
-%{_libdir}/libswscale.so
-%{_libdir}/pkgconfig/libswscale.pc
-%{_libdir}/pkgconfig/libavcodec.pc
-%{_libdir}/pkgconfig/libavdevice.pc
-%{_libdir}/pkgconfig/libavfilter.pc
-%{_libdir}/pkgconfig/libavformat.pc
-%{_libdir}/pkgconfig/libavutil.pc
-%{_libdir}/pkgconfig/libpostproc.pc
+%{_libdir}/pkgconfig/lib*.pc
+%{_libdir}/lib*.so
+%ifarch %{ix86}
+%{_libdir}/i686/lib*.so
+%endif
+%ifarch ppc ppc64
+%{_libdir}/altivec/lib*.so
+%endif
+%ifarch sparc sparc64
+%{_libdir}/v9/lib*.so
+%endif
%changelog
+* Sat Jan 31 2009 Dominik Mierzejewski <rpm at greysector.net> -
0.4.9-0.49.20080908
+- drop unnecessary patch
+- change the lib split on x86, it doesn't work right for P3/AthlonXP
+- enable bzlib and dirac support via external libs
+- sort BR list alphabetically
+- fix a couple of exploitable and potentially exploitable vulnerabilities, including
+
http://www.trapkit.de/advisories/TKADV2009-004.txt
+- add obsoletes for -compat package (RPMFusion bug #173)
+- reworked build system
+- build optimized versions where it makes sense
+- specfile cleanups
+- enable yasm for optimized asm routines on x86_32
+- add obsoletes for Freshrpms' libpostproc subpackage
+
* Thu Sep 18 2008 Dominik Mierzejewski <rpm at greysector.net> -
0.4.9-0.48.20080908
- 20080908 snapshot (r25261), last before ABI change
- fix build --with amr