r1465 - in /unstable/ffmpeg-debian/debian: ./ patches/

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Sep 14 18:24:43 UTC 2008


Author: siretart
Date: Sun Sep 14 18:24:43 2008
New Revision: 1465

URL: http://svn.debian.org/wsvn/pkg-multimedia/?sc=1&rev=1465
Log:
revert the current unstable branch to what is currently found in unstable. the work continues in the experimental branch

Added:
    unstable/ffmpeg-debian/debian/patches/010_fix_ftbfs_hppa.diff
    unstable/ffmpeg-debian/debian/patches/010_proper_rpath.diff
    unstable/ffmpeg-debian/debian/patches/013_strip_unneeded_linker_flags.diff
    unstable/ffmpeg-debian/debian/patches/020_bug489965_bufferoverflow_str_demuxer.diff
    unstable/ffmpeg-debian/debian/patches/020_fix_libswscale_pic_code
    unstable/ffmpeg-debian/debian/patches/10_fix_kfreebsd_libx11_linkage.diff
    unstable/ffmpeg-debian/debian/patches/300_c++_compliant_headers.diff
Modified:
    unstable/ffmpeg-debian/debian/changelog
    unstable/ffmpeg-debian/debian/confflags
    unstable/ffmpeg-debian/debian/ffmpeg.install
    unstable/ffmpeg-debian/debian/libavcodec-dev.install
    unstable/ffmpeg-debian/debian/libavdevice-dev.install
    unstable/ffmpeg-debian/debian/libavformat-dev.install
    unstable/ffmpeg-debian/debian/libavutil-dev.install
    unstable/ffmpeg-debian/debian/libpostproc-dev.install
    unstable/ffmpeg-debian/debian/libswscale-dev.install
    unstable/ffmpeg-debian/debian/patches/001_fixup_version.diff
    unstable/ffmpeg-debian/debian/patches/series
    unstable/ffmpeg-debian/debian/rules

Modified: unstable/ffmpeg-debian/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/changelog?rev=1465&op=diff
==============================================================================
--- unstable/ffmpeg-debian/debian/changelog (original)
+++ unstable/ffmpeg-debian/debian/changelog Sun Sep 14 18:24:43 2008
@@ -1,30 +1,3 @@
-ffmpeg-debian (0.svn20080906-1) UNRELEASED; urgency=low
-
-  [ Loic Minier ]
-  * Tweak sed versions regexps to deal with epochs and upstream revisions with
-    dashes and be generally stricter.
-  * Large cleanup to rules logic: drop some cruft, rewrite some small chunks
-    in a slightly more readable manner, whitespaces, .PHONY fixes,
-    internalencoders handling, shlibs logic...
-  * Rename SRC_VERSION to UPSTREAM_VERSION in rules.
-  * Use DEB_SOURCE from the Source: field of dpkg-parsechangelog's output
-    instead of hardcoding the name of the source.
-
-  [ Reinhard Tartler ]
-  * new svn snapshot (svn revision 15219, libswscale revision 27530).
-  * drop old scaler (imgres/imgconvert). Upstream is about to remove it
-    completely.
-
-  [ Fabian Greffrath ]
-  * debian/{ffmpeg,lib*-dev}.install:
-    + Simplified, e.g. install the whole /usr/include/ sub-directory for each
-      particular library instead of single header files one by one.
-
-  [ Loic Minier ]
-  * Remove debug echo which broke shlibs, sorry.
-
- -- Reinhard Tartler <siretart at tauware.de>  Sat, 06 Sep 2008 20:07:01 +0200
-
 ffmpeg-debian (0.svn20080206-12) unstable; urgency=low
 
   * enable vhook in all flavors. (Closes: #490272, LP: #260296)

Modified: unstable/ffmpeg-debian/debian/confflags
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/confflags?rev=1465&op=diff
==============================================================================
--- unstable/ffmpeg-debian/debian/confflags (original)
+++ unstable/ffmpeg-debian/debian/confflags Sun Sep 14 18:24:43 2008
@@ -1,5 +1,4 @@
 # -*- mode: makefile -*-
-# vim:syntax=make
 #
 # build a static version on every architecture
 # shared is generic, i.e. without arch specific opcodes
@@ -18,37 +17,38 @@
 FLAVORS += vis
 endif
 
-# Configuration flags causing the libs to be GPL tainted
-gpl_confflags += --enable-gpl
+# Comment out the following lines for LGPL versions of the libraries
+gpl_confflags := --enable-gpl
 gpl_confflags += --enable-libfaad
-gpl_confflags += --enable-postproc
-gpl_confflags += --enable-swscale
+gpl_confflags += --enable-pp
+gpl_confflags += --enable-swscaler
 gpl_confflags += --enable-x11grab
 
-# Common configuration flags; comment out following line for LGPL versions of
-# the libraries
-confflags += $(gpl_confflags)
+# Common configuration flags
+confflags := $(gpl_confflags)
 confflags += --prefix=/usr
 confflags += --enable-libgsm
 confflags += --enable-libtheora
 confflags += --enable-libvorbis
 confflags += --enable-pthreads
-confflags += --disable-stripping
+confflags += --disable-strip
 
 # Enable IEEE 1394 (FireWire) support on Linux only
 ifneq (,$(findstring linux,$(DEB_HOST_GNU_TYPE)))
   confflags += --enable-libdc1394
-  lib1394-dev += libraw1394-dev, libdc1394-22-dev
+  lib1394-dev = libraw1394-dev, libdc1394-22-dev
+else
+  lib1394-dev =
 endif
 
-# XXX this probably needs fixing
-CFLAGS :=
-
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+  CFLAGS :=
 # Various parts of ffmpeg (and swscale) FTBFS when compiling with -fPIC
 # and with mmx code enabled.
   confflags += --disable-optimizations
   confflags += --disable-mmx
+else
+  CFLAGS :=
 endif
 
 # Support for additional external codecs
@@ -76,14 +76,14 @@
 nooptflags += --disable-vis
 
 # Configuration flags for the static libraries
-static_build_confflags += $(confflags)
+static_build_confflags := $(confflags)
 static_build_confflags += --disable-ffmpeg
 static_build_confflags += --disable-vhook
 static_build_confflags += --disable-ffserver
 static_build_confflags += --disable-ffplay
 
 # Configuration flags for the non-optimized shared libraries
-shared_build_confflags += $(confflags)
+shared_build_confflags := $(confflags)
 # amd64 has no problems with optimized shared libs. i386 and arm do.
 ifneq      ($(DEB_HOST_ARCH),amd64)
 shared_build_confflags += $(nooptflags)
@@ -93,7 +93,7 @@
 
 ## i386 architecture specific
 # Configuration flags for the optimized shared libraries
-cmov_build_confflags += $(confflags)
+cmov_build_confflags := $(confflags)
 cmov_build_confflags += $(nooptflags)
 cmov_build_confflags += --shlibdir=/usr/lib/i686/cmov
 cmov_build_confflags += --cpu='i686'
@@ -105,7 +105,7 @@
 
 ## powerpc architecture specific
 # Configuration flags for the optimized shared libraries
-altivec_build_confflags += $(confflags)
+altivec_build_confflags := $(confflags)
 altivec_build_confflags += --shlibdir=/usr/lib/altivec
 altivec_build_confflags += --cpu='g4'
 altivec_build_confflags += --enable-shared
@@ -118,7 +118,7 @@
 
 ## sparc architecture specific
 # Configuration flags for the optimized shared libraries
-vis_build_confflags += $(confflags)
+vis_build_confflags := $(confflags)
 vis_build_confflags += --shlibdir=/usr/lib/v9
 vis_build_confflags += --cpu='sparc64'
 vis_build_confflags += --enable-shared
@@ -137,6 +137,5 @@
 
 # Additional documentation for PowerPC
 ifneq (,$(findstring powerpc,$(DEB_BUILD_GNU_TYPE)))
-  extradoc := doc/ffmpeg_powerpc_performance_evaluation_howto.txt
+  extradoc = doc/ffmpeg_powerpc_performance_evaluation_howto.txt
 endif
-

Modified: unstable/ffmpeg-debian/debian/ffmpeg.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/ffmpeg.install?rev=1465&op=diff
==============================================================================
--- unstable/ffmpeg-debian/debian/ffmpeg.install (original)
+++ unstable/ffmpeg-debian/debian/ffmpeg.install Sun Sep 14 18:24:43 2008
@@ -1,5 +1,10 @@
-etc
-usr/bin
+etc/ffserver.conf
 usr/lib/{,*/,*/*/}vhook
+usr/bin/ffmpeg
+usr/bin/ffserver
+usr/bin/ffplay
+usr/bin/qt-faststart
 usr/share/doc/ffmpeg
-usr/share/man
+usr/share/man/man1/ffmpeg.1
+usr/share/man/man1/ffserver.1
+usr/share/man/man1/ffplay.1

Modified: unstable/ffmpeg-debian/debian/libavcodec-dev.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/libavcodec-dev.install?rev=1465&op=diff
==============================================================================
--- unstable/ffmpeg-debian/debian/libavcodec-dev.install (original)
+++ unstable/ffmpeg-debian/debian/libavcodec-dev.install Sun Sep 14 18:24:43 2008
@@ -1,4 +1,5 @@
-usr/include/libavcodec
+usr/lib/pkgconfig/libavcodec.pc
+usr/include/ffmpeg/avcodec.h
+usr/include/ffmpeg/dsputil.h
 usr/lib/libavcodec.a
 usr/lib/{,*/,*/*/}libavcodec.so
-usr/lib/pkgconfig/libavcodec.pc

Modified: unstable/ffmpeg-debian/debian/libavdevice-dev.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/libavdevice-dev.install?rev=1465&op=diff
==============================================================================
--- unstable/ffmpeg-debian/debian/libavdevice-dev.install (original)
+++ unstable/ffmpeg-debian/debian/libavdevice-dev.install Sun Sep 14 18:24:43 2008
@@ -1,4 +1,4 @@
-usr/include/libavdevice
+usr/lib/pkgconfig/libavdevice.pc
+usr/include/ffmpeg/avdevice.h
 usr/lib/libavdevice.a
 usr/lib/{,*/,*/*/}libavdevice.so
-usr/lib/pkgconfig/libavdevice.pc

Modified: unstable/ffmpeg-debian/debian/libavformat-dev.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/libavformat-dev.install?rev=1465&op=diff
==============================================================================
--- unstable/ffmpeg-debian/debian/libavformat-dev.install (original)
+++ unstable/ffmpeg-debian/debian/libavformat-dev.install Sun Sep 14 18:24:43 2008
@@ -1,4 +1,7 @@
-usr/include/libavformat
+usr/lib/pkgconfig/libavformat.pc
+usr/include/ffmpeg/avformat.h
+usr/include/ffmpeg/avio.h
+usr/include/ffmpeg/rtsp.h
+usr/include/ffmpeg/rtspcodes.h
 usr/lib/libavformat.a
 usr/lib/{,*/,*/*/}libavformat.so
-usr/lib/pkgconfig/libavformat.pc

Modified: unstable/ffmpeg-debian/debian/libavutil-dev.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/libavutil-dev.install?rev=1465&op=diff
==============================================================================
--- unstable/ffmpeg-debian/debian/libavutil-dev.install (original)
+++ unstable/ffmpeg-debian/debian/libavutil-dev.install Sun Sep 14 18:24:43 2008
@@ -1,4 +1,20 @@
-usr/include/libavutil
+usr/lib/pkgconfig/libavutil.pc
+usr/include/ffmpeg/adler32.h
+usr/include/ffmpeg/avstring.h
+usr/include/ffmpeg/avutil.h
+usr/include/ffmpeg/base64.h
+usr/include/ffmpeg/common.h
+usr/include/ffmpeg/crc.h
+usr/include/ffmpeg/fifo.h
+usr/include/ffmpeg/intfloat_readwrite.h
+usr/include/ffmpeg/log.h
+usr/include/ffmpeg/lzo.h
+usr/include/ffmpeg/mathematics.h
+usr/include/ffmpeg/md5.h
+usr/include/ffmpeg/mem.h
+usr/include/ffmpeg/opt.h
+usr/include/ffmpeg/random.h
+usr/include/ffmpeg/rational.h
+usr/include/ffmpeg/sha1.h
 usr/lib/libavutil.a
 usr/lib/{,*/,*/*/}libavutil.so
-usr/lib/pkgconfig/libavutil.pc

Modified: unstable/ffmpeg-debian/debian/libpostproc-dev.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/libpostproc-dev.install?rev=1465&op=diff
==============================================================================
--- unstable/ffmpeg-debian/debian/libpostproc-dev.install (original)
+++ unstable/ffmpeg-debian/debian/libpostproc-dev.install Sun Sep 14 18:24:43 2008
@@ -1,4 +1,4 @@
-usr/include/libpostproc
+usr/lib/pkgconfig/libpostproc.pc
+usr/include/postproc/postprocess.h
 usr/lib/libpostproc.a
 usr/lib/{,*/,*/*/}libpostproc.so
-usr/lib/pkgconfig/libpostproc.pc

Modified: unstable/ffmpeg-debian/debian/libswscale-dev.install
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/libswscale-dev.install?rev=1465&op=diff
==============================================================================
--- unstable/ffmpeg-debian/debian/libswscale-dev.install (original)
+++ unstable/ffmpeg-debian/debian/libswscale-dev.install Sun Sep 14 18:24:43 2008
@@ -1,4 +1,5 @@
-usr/include/libswscale
+usr/lib/pkgconfig/libswscale.pc
+usr/include/ffmpeg/swscale.h
+usr/include/ffmpeg/rgb2rgb.h
 usr/lib/libswscale.a
 usr/lib/{,*/,*/*/}libswscale.so
-usr/lib/pkgconfig/libswscale.pc

Modified: unstable/ffmpeg-debian/debian/patches/001_fixup_version.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/patches/001_fixup_version.diff?rev=1465&op=diff
==============================================================================
--- unstable/ffmpeg-debian/debian/patches/001_fixup_version.diff (original)
+++ unstable/ffmpeg-debian/debian/patches/001_fixup_version.diff Sun Sep 14 18:24:43 2008
@@ -7,7 +7,7 @@
 +# check for debian package branch
 +if test -f "$1"/debian/control; then
 +    debrevision=`cd "$1" && dpkg-parsechangelog | awk '/^Version/ {print $2}'`
-+    revision="r15219+debian_${debrevision}"
++    revision="r11872+debian_${debrevision}"
 +fi
 +
  # check for git short hash

Added: unstable/ffmpeg-debian/debian/patches/010_fix_ftbfs_hppa.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/patches/010_fix_ftbfs_hppa.diff?rev=1465&op=file
==============================================================================
--- unstable/ffmpeg-debian/debian/patches/010_fix_ftbfs_hppa.diff (added)
+++ unstable/ffmpeg-debian/debian/patches/010_fix_ftbfs_hppa.diff Sun Sep 14 18:24:43 2008
@@ -1,0 +1,19 @@
+On hppa shared objects do required object files to be build -fPIC
+-DPIC. The following patch has been taken from upstream svn r14200:
+
+------------------------------------------------------------------------
+r14200 | diego | 2008-07-13 14:40:11 +0200 (So, 13 Jul 2008) | 2 lines
+
+Add parisc* to the list of architectures requiring PIC flags for shared libs.
+
+--- a/configure
++++ b/configure
+@@ -1811,7 +1811,7 @@ if enabled shared; then
+     # LIBOBJFLAGS may have already been set in the OS configuration
+     if test -z "$LIBOBJFLAGS" ; then
+         case "$arch" in
+-            x86_64|ia64|alpha|sparc*|power*) LIBOBJFLAGS='$(PIC)' ;;
++            x86_64|ia64|alpha|sparc*|power*|parisc*) LIBOBJFLAGS='$(PIC)' ;;
+         esac
+     fi
+ fi

Added: unstable/ffmpeg-debian/debian/patches/010_proper_rpath.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/patches/010_proper_rpath.diff?rev=1465&op=file
==============================================================================
--- unstable/ffmpeg-debian/debian/patches/010_proper_rpath.diff (added)
+++ unstable/ffmpeg-debian/debian/patches/010_proper_rpath.diff Sun Sep 14 18:24:43 2008
@@ -1,0 +1,15 @@
+This can be dropped on the next ffmpeg update. (20080606)
+
+Index: ffmpeg.20080206/configure
+===================================================================
+--- ffmpeg.20080206.orig/configure	2008-03-15 22:51:31.000000000 +0100
++++ ffmpeg.20080206/configure	2008-03-15 22:51:58.000000000 +0100
+@@ -922,7 +922,7 @@
+ # build settings
+ SHFLAGS='-shared -Wl,-soname,$@'
+ VHOOKSHFLAGS='$(SHFLAGS)'
+-LDLATEFLAGS='-Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
++LDLATEFLAGS='-Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil -Wl,-rpath-link,\$(BUILD_ROOT)/libswscale'
+ FFSERVERLDFLAGS=-Wl,-E
+ LDCONFIG="ldconfig"
+ LIBPREF="lib"

Added: unstable/ffmpeg-debian/debian/patches/013_strip_unneeded_linker_flags.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/patches/013_strip_unneeded_linker_flags.diff?rev=1465&op=file
==============================================================================
--- unstable/ffmpeg-debian/debian/patches/013_strip_unneeded_linker_flags.diff (added)
+++ unstable/ffmpeg-debian/debian/patches/013_strip_unneeded_linker_flags.diff Sun Sep 14 18:24:43 2008
@@ -1,0 +1,37 @@
+The following patch has been discussed on #ffmpeg-devel on 2008-06-03:
+
+16:35:29 <@DonDiego> 013_strip_unneeded_linker_flags.diff
+16:35:33 <@DonDiego> won't apply anymore
+16:35:41 <@DonDiego> and i think it is unnecessary now
+16:35:55 <@DonDiego> we did enough fixes for pkg-config recently
+16:37:04 < siretart> what does 'recently' mean? ;)
+16:37:38 <@DonDiego> during the past weeks
+16:37:50 <@DonDiego> the last one yesterday
+16:37:59 <@DonDiego> no known pkg-config bugs remain
+16:38:07 < siretart> I noticed that nowadays configure has completly  rewritten pkgconfig_generate shell functions.
+16:38:14 <@DonDiego> yes
+16:38:23 < siretart> ah, okay, this mean I can drop it next time I update ffmpeg. I'll make a note about this in the patch header
+16:38:25 <@DonDiego> courtesy of myself
+16:38:38 < siretart> thanks!
+
+
+Index: ffmpeg/configure
+===================================================================
+--- ffmpeg.orig/configure	2008-05-29 15:39:38.000000000 +0200
++++ ffmpeg/configure	2008-05-29 15:39:43.000000000 +0200
+@@ -2170,11 +2170,11 @@
+ pkgconfig_generate libavutil "FFmpeg utility library" "$lavu_version" -lavutil "" ffmpeg
+ pkgconfig_generate_uninstalled libavutil "FFmpeg utility library" "$lavu_version"
+ 
+-pkgconfig_generate libavcodec "FFmpeg codec library" "$lavc_version" "-lavcodec $extralibs" "$pkg_requires libavutil = $lavu_version" ffmpeg
+-pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$lavc_version" "$extralibs" "$pkg_requires libavutil = $lavu_version"
++pkgconfig_generate libavcodec "FFmpeg codec library" "$lavc_version" "-lavcodec" "$pkg_requires libavutil = $lavu_version" ffmpeg
++pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$lavc_version" "" "$pkg_requires libavutil = $lavu_version"
+ 
+-pkgconfig_generate libavformat "FFmpeg container format library" "$lavf_version" "-lavformat $extralibs" "$pkg_requires libavcodec = $lavc_version" ffmpeg
+-pkgconfig_generate_uninstalled libavformat "FFmpeg container format library" "$lavf_version" "$extralibs" "$pkg_requires libavcodec = $lavc_version"
++pkgconfig_generate libavformat "FFmpeg container format library" "$lavf_version" "-lavformat" "$pkg_requires libavcodec = $lavc_version" ffmpeg
++pkgconfig_generate_uninstalled libavformat "FFmpeg container format library" "$lavf_version" "" "$pkg_requires libavcodec = $lavc_version"
+ 
+ pkgconfig_generate libavdevice "FFmpeg device handling library" "$lavd_version" "-lavdevice $extralibs" "$pkg_requires libavformat = $lavf_version" ffmpeg
+ pkgconfig_generate_uninstalled libavdevice "FFmpeg device handling library" "$lavd_version" "$extralibs" "$pkg_requires libavformat = $lavf_version"

Added: unstable/ffmpeg-debian/debian/patches/020_bug489965_bufferoverflow_str_demuxer.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/patches/020_bug489965_bufferoverflow_str_demuxer.diff?rev=1465&op=file
==============================================================================
--- unstable/ffmpeg-debian/debian/patches/020_bug489965_bufferoverflow_str_demuxer.diff (added)
+++ unstable/ffmpeg-debian/debian/patches/020_bug489965_bufferoverflow_str_demuxer.diff Sun Sep 14 18:24:43 2008
@@ -1,0 +1,76 @@
+From: Moritz Muehlenhoff <jmm at debian.org>
+Subject: Bug#489965: libavformat52: Buffer overflow in STR demuxer
+To: Debian Bug Tracking System <submit at bugs.debian.org>
+Date: Wed, 09 Jul 2008 01:08:43 +0200
+Resent-From: Moritz Muehlenhoff <jmm at debian.org>
+Reply-To: Moritz Muehlenhoff <jmm at debian.org>, 489965 at bugs.debian.org                                                                        
+
+Package: libavformat52
+Version: 0.svn20080206-9
+Severity: grave
+Tags: security
+Justification: user security hole
+
+I noticed the following issue when browsing ffmpeg commit logs:
+
+http://svn.mplayerhq.hu/ffmpeg?view=rev&revision=13993
+https://roundup.mplayerhq.hu/roundup/ffmpeg/issue311
+
+
+
+
+
+The following patch is taken from upstream svn, revision 13993.
+
+--- a/libavformat/psxstr.c
++++ b/libavformat/psxstr.c
+@@ -276,12 +276,23 @@ static int str_read_packet(AVFormatConte
+                 int current_sector = AV_RL16(&sector[0x1C]);
+                 int sector_count   = AV_RL16(&sector[0x1E]);
+                 int frame_size = AV_RL32(&sector[0x24]);
+-                int bytes_to_copy;
++
++                if(!(   frame_size>=0
++                     && current_sector < sector_count
++                     && sector_count*VIDEO_DATA_CHUNK_SIZE >=frame_size)){
++                    av_log(s, AV_LOG_ERROR, "Invalid parameters %d %d %d\n", current_sector, sector_count, frame_size);
++                    return AVERROR_INVALIDDATA;
++                }
++
+ //        printf("%d %d %d\n",current_sector,sector_count,frame_size);
+                 /* if this is the first sector of the frame, allocate a pkt */
+                 pkt = &str->tmp_pkt;
+-                if (current_sector == 0) {
+-                    if (av_new_packet(pkt, frame_size))
++
++                if(pkt->size != sector_count*VIDEO_DATA_CHUNK_SIZE){
++                    if(pkt->data)
++                        av_log(s, AV_LOG_ERROR, "missmatching sector_count\n");
++                    av_free_packet(pkt);
++                    if (av_new_packet(pkt, sector_count*VIDEO_DATA_CHUNK_SIZE))
+                         return AVERROR(EIO);
+ 
+                     pkt->pos= url_ftell(pb) - RAW_CD_SECTOR_SIZE;
+@@ -295,15 +306,15 @@ static int str_read_packet(AVFormatConte
+                        str->pts += (90000 / 15);
+                 }
+ 
+-                /* load all the constituent chunks in the video packet */
+-                bytes_to_copy = frame_size - current_sector*VIDEO_DATA_CHUNK_SIZE;
+-                if (bytes_to_copy>0) {
+-                    if (bytes_to_copy>VIDEO_DATA_CHUNK_SIZE) bytes_to_copy=VIDEO_DATA_CHUNK_SIZE;
+-                    memcpy(pkt->data + current_sector*VIDEO_DATA_CHUNK_SIZE,
+-                        sector + VIDEO_DATA_HEADER_SIZE, bytes_to_copy);
+-                }
++                memcpy(pkt->data + current_sector*VIDEO_DATA_CHUNK_SIZE,
++                       sector + VIDEO_DATA_HEADER_SIZE,
++                       VIDEO_DATA_CHUNK_SIZE);
++
+                 if (current_sector == sector_count-1) {
++                    pkt->size= frame_size;
+                     *ret_pkt = *pkt;
++                    pkt->data= NULL;
++                    pkt->size= -1;
+                     return 0;
+                 }
+ 

Added: unstable/ffmpeg-debian/debian/patches/020_fix_libswscale_pic_code
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/patches/020_fix_libswscale_pic_code?rev=1465&op=file
==============================================================================
--- unstable/ffmpeg-debian/debian/patches/020_fix_libswscale_pic_code (added)
+++ unstable/ffmpeg-debian/debian/patches/020_fix_libswscale_pic_code Sun Sep 14 18:24:43 2008
@@ -1,0 +1,36 @@
+The following patch has been discussed on #ffmpeg-devel on 2008-06-02:
+
+03:14:18 <@astrange> swscale+mmx2+x86-64 was fixed a while ago
+03:15:03 <@DonDiego> siretart: one less patch for you..
+12:44:59 < siretart> DonDiego: however, do you know what 'some time ago' means?
+                     a commit number or at least a month would help me to
+                     determine if the snapshot I have in debian is affected
+                     or not
+12:45:35 <@DonDiego> or wait, let me look at the logs..
+12:46:40 <@DonDiego> r26270 | diego | 2008-03-22 19:22:53 +0100 (Sat, 22 Mar 2008) | 3 lines
+
+status: still needs investigation/backport of that revision and a testbuild on amd64.
+
+
+Index: ffmpeg.20080206/libswscale/swscale.c
+===================================================================
+--- ffmpeg.20080206.orig/libswscale/swscale.c	2008-01-29 15:58:10.000000000 +0100
++++ ffmpeg.20080206/libswscale/swscale.c	2008-03-15 23:11:50.000000000 +0100
+@@ -1357,7 +1357,7 @@
+     return 0;
+ }
+ 
+-#ifdef COMPILE_MMX2
++#if defined (COMPILE_MMX2) && !defined(ARCH_X86_64)
+ static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode, int16_t *filter, int32_t *filterPos, int numSplits)
+ {
+     uint8_t *fragmentA;
+@@ -2300,7 +2300,7 @@
+                    srcFilter->chrH, dstFilter->chrH, c->param);
+ 
+ #define MAX_FUNNY_CODE_SIZE 10000
+-#if defined(COMPILE_MMX2)
++#if defined (COMPILE_MMX2) && !defined(ARCH_X86_64)
+ // can't downscale !!!
+         if (c->canMMX2BeUsed && (flags & SWS_FAST_BILINEAR))
+         {

Added: unstable/ffmpeg-debian/debian/patches/10_fix_kfreebsd_libx11_linkage.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/patches/10_fix_kfreebsd_libx11_linkage.diff?rev=1465&op=file
==============================================================================
--- unstable/ffmpeg-debian/debian/patches/10_fix_kfreebsd_libx11_linkage.diff (added)
+++ unstable/ffmpeg-debian/debian/patches/10_fix_kfreebsd_libx11_linkage.diff Sun Sep 14 18:24:43 2008
@@ -1,0 +1,31 @@
+From: Aurelien Jarno <aurel32 at debian.org>
+Subject: ffmpeg-free: libraries linked with libX11 on GNU/kFreeBSD
+Date: Fri, 20 Jun 2008 17:04:03 +0200
+
+Package: ffmpeg-free
+Version: 0.svn20080206-8
+Severity: normal
+Tags: patch
+
+ffmpeg-free links with -Wl,--as-needed on GNU/Linux, so the resulting
+libraries are not linked with libX11. This is something required by VLC.
+
+On GNU/kFreeBSD, -Wl,--as-needed is not used, so VLC fails to build.
+Please find below a patch to fix that.
+
+For full details c.f. http://bugs.debian.org/487252
+
+Submitted upstream at http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/71087
+
+--- a/configure
++++ b/configure
+@@ -1289,6 +1289,9 @@ case $targetos in
+         SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib'
+         vhook="no"
+         ;;
++    gnu/kfreebsd)
++        LDLATEFLAGS="-Wl,--as-needed $LDLATEFLAGS"
++        ;;
+ 
+     *)
+         targetos="${targetos}-UNKNOWN"

Added: unstable/ffmpeg-debian/debian/patches/300_c++_compliant_headers.diff
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/patches/300_c%2B%2B_compliant_headers.diff?rev=1465&op=file
==============================================================================
--- unstable/ffmpeg-debian/debian/patches/300_c++_compliant_headers.diff (added)
+++ unstable/ffmpeg-debian/debian/patches/300_c++_compliant_headers.diff Sun Sep 14 18:24:43 2008
@@ -1,0 +1,29 @@
+The following patch has been discussed on #ffmpeg-devel on 2008-06-03:
+
+16:30:04 <@DonDiego> 300_c++_compliant_headers.diff
+16:30:13 <@DonDiego> siretart: this patch is wrong for two reasons
+16:31:21 <@DonDiego> 1) the header is not #included everywhere that INT64_C is used
+16:31:44 <@DonDiego> 2) if this is required for C++, then C++ programs should add the definition themselves
+16:31:53 <@DonDiego> it has no place in a C-only library
+
+Todo: Check if any package actually relies on that.
+
+Index: ffmpeg.20080206/libavcodec/avcodec.h
+===================================================================
+--- ffmpeg.20080206.orig/libavcodec/avcodec.h	2008-03-15 22:59:25.000000000 +0100
++++ ffmpeg.20080206/libavcodec/avcodec.h	2008-03-15 23:12:06.000000000 +0100
+@@ -30,6 +30,14 @@
+ #include "avutil.h"
+ #include <sys/types.h> /* size_t */
+ 
++#if !defined INT64_C
++#if defined __WORDSIZE && __WORDSIZE == 64
++#define INT64_C(c) c ## L
++#else
++#define INT64_C(c) c ## LL
++#endif
++#endif
++
+ #define AV_STRINGIFY(s)         AV_TOSTRING(s)
+ #define AV_TOSTRING(s) #s
+ 

Modified: unstable/ffmpeg-debian/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/patches/series?rev=1465&op=diff
==============================================================================
--- unstable/ffmpeg-debian/debian/patches/series (original)
+++ unstable/ffmpeg-debian/debian/patches/series Sun Sep 14 18:24:43 2008
@@ -1,3 +1,10 @@
 001_fixup_version.diff
-#015_reenable-img_convert.diff
+010_fix_ftbfs_hppa.diff
+10_fix_kfreebsd_libx11_linkage.diff
+010_proper_rpath.diff
+013_strip_unneeded_linker_flags.diff
+015_reenable-img_convert.diff
+020_fix_libswscale_pic_code
+020_bug489965_bufferoverflow_str_demuxer.diff
+300_c++_compliant_headers.diff
 900_doxyfile

Modified: unstable/ffmpeg-debian/debian/rules
URL: http://svn.debian.org/wsvn/pkg-multimedia/unstable/ffmpeg-debian/debian/rules?rev=1465&op=diff
==============================================================================
--- unstable/ffmpeg-debian/debian/rules (original)
+++ unstable/ffmpeg-debian/debian/rules Sun Sep 14 18:24:43 2008
@@ -2,75 +2,76 @@
 
 include /usr/share/quilt/quilt.make
 
-DEB_SOURCE := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
-DEB_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p')
-UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed -r 's/[^:]+://; s/-[^-]+$$//')
-SVN_VERSION := $(shell echo $(UPSTREAM_VERSION) | sed -nr 's/^[0-9.:-]+\.svn([0-9]+)$$/\1/p')
-SHLIBS_VERSION := 0.svn20080206-8
+#export DH_VERBOSE=1
 
-LIB_PKGS := $(shell sed -nr 's/^Package:[[:space:]]*(lib(avutil|avcodec|avdevice|postproc|avformat|swscale)[0-9]+)[[:space:]]*$$/\1/p' debian/control)
+DEB_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: //p')
+SRC_VERSION := $(shell echo $(DEB_VERSION) | cut -d '-' -f 1)
+SVN_VERSION := $(shell echo $(SRC_VERSION) | sed -ne 's/^[0-9]\.[a-z]*//p')
 
-internalencoders := $(findstring internalencoders,$(DEB_BUILD_OPTIONS))
+LIBS := libavutil libavcodec libpostproc libavformat libavdevice libswscale
 
 include debian/confflags
 
-$(info FLAVORS = $(FLAVORS))
-$(info DEB_BUILD_OPTIONS = $(DEB_BUILD_OPTIONS))
-$(info CFLAGS = $(CFLAGS))
-$(info internalencoders = $(internalencoders))
+$(info Building FFmpeg for flavors: $(FLAVORS))
+$(info DEB_BUILD_OPTIONS are: $(DEB_BUILD_OPTIONS))
+$(info Using as CFLAGS: $(CFLAGS))
 
 config-extra-includes.h:
 	sh debian/fixup-config.sh > $@
 
-configure-%: configure-stamp-%
-configure-stamp-%: $(QUILT_STAMPFN) config-extra-includes.h
+configure-%: configure-%-stamp
+configure-%-stamp: $(QUILT_STAMPFN) config-extra-includes.h
 	dh_testdir
 	mkdir -p debian-$*
-	cd debian-$* && CFLAGS="$(CFLAGS)" $(CURDIR)/configure $($*_build_confflags)
-ifeq ($(internalencoders),)
+	cd debian-$* && CFLAGS="$(CFLAGS)" ../configure $($*_build_confflags)
+ifeq (,$(findstring internalencoders,$(DEB_BUILD_OPTIONS)))
 	echo "#include \"config-extra-includes.h\"" >> debian-$*/config.h
 endif
 	touch $@
 
-build-%: build-stamp-%
-build-stamp-%: configure-stamp-%
+build-%: build-%-stamp
+build-%-stamp: configure-%-stamp
 	dh_testdir
 	$(MAKE) -C debian-$* -j $(NJOBS)
 	touch $@
 
-debian-shared/tools/qt-faststart: build-stamp-shared
+debian-shared/tools/qt-faststart: build-shared-stamp
 	$(MAKE) -C debian-shared tools/qt-faststart
 
 build-doxy: build-doxy-stamp
-build-doxy-stamp: $(QUILT_STAMPFN)
+build-doxy-stamp: $(QUILT_STAMPFN) 
 	dh_testdir
 	doxygen
 	touch $@
 
+BUILD_STAMPS=$(foreach flavor,$(FLAVORS),build-$(flavor)-stamp)
 build: build-stamp
-build-stamp: $(addprefix build-stamp-, $(FLAVORS)) debian-shared/tools/qt-faststart
+build-stamp: $(BUILD_STAMPS) debian-shared/tools/qt-faststart
 	touch $@
 
 clean: clean-real unpatch
 clean-real:
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp $(addprefix build-stamp-, $(FLAVORS)) \
-	    $(addprefix configure-stamp-, $(FLAVORS)) patch-stamp
-	rm -rf $(addprefix debian-, $(FLAVORS)) doxy
+	rm -f build-stamp build-*-stamp configure-*-stamp patch-stamp
+	rm -rf $(foreach flavor,$(FLAVORS),debian-$(flavor)) doxy
 	dh_clean config-extra-includes.h debian/tmp.debhelper.log
 
 get-orig-source:
 	dh_testdir
-	# strip patented code
+ifeq (,$(findstring internalencoders,$(DEB_BUILD_OPTIONS)))
+        # Disable potentially dangerous patented code
 	chmod +x debian/strip.sh
 	sh debian/get-orig-source.sh -r{$(SVN_VERSION)} \
-	    $(if $(internalencoders),, -c $(CURDIR)/debian/strip.sh) \
-	    -o ../$(DEB_SOURCE)_$(UPSTREAM_VERSION).orig.tar.gz
+	    -c $(CURDIR)/debian/strip.sh \
+	    -o ../ffmpeg-debian_$(SRC_VERSION).orig.tar.gz
+else
+	sh debian/get-orig-source.sh -r{$(SVN_VERSION)} \
+	    -o ../ffmpeg_$(SRC_VERSION).orig.tar.gz
+endif
 
-# The trailing newline is important!
 define install_flavor
-	$(MAKE) -C debian-$(1) install DESTDIR=$(CURDIR)/debian/tmp \
+	$(MAKE) -C debian-$(1) install DESTDIR=$(CURDIR)/debian/tmp/ \
 	    mandir=$(CURDIR)/debian/tmp/usr/share/man
 
 endef
@@ -82,15 +83,22 @@
 	dh_installdirs -ptmp usr/share/doc/ffmpeg/html etc
 	dh_installdirs -ptmp usr/share/doc/ffmpeg-doc/html
 	$(foreach flavor,$(FLAVORS),$(call install_flavor,$(flavor)))
-	cp -a libavcodec/dsputil.h debian/tmp/usr/include/libavcodec
+	cp -a libavcodec/dsputil.h debian/tmp/usr/include/ffmpeg
 	cp debian-shared/doc/*.html debian/tmp/usr/share/doc/ffmpeg/html/
-	# don't fail on binary-indep only builds.
-	[ ! -d doxy ] || cp doxy/html/* debian/tmp/usr/share/doc/ffmpeg-doc/html
+#	dont fail on binary-indep only builds.
+	if test -d doxy; then \
+		cp doxy/html/* debian/tmp/usr/share/doc/ffmpeg-doc/html/; \
+	fi
 	cp doc/ffserver.conf debian/tmp/etc/
 	cp debian-shared/tools/qt-faststart debian/tmp/usr/bin/qt-faststart
 	dh_install --fail-missing --sourcedir=debian/tmp
 
 binary-indep: build-doxy install
+
+define call_dh_makeshlibs
+	dh_makeshlibs -p $(1)$(2) \
+	    -V "$(1)$(2) (>= $(SRC_VERSION)-8) | $(1)-unstripped-$(2) (>= $(SRC_VERSION)-8)"
+endef
 
 binary-arch: build install
 	dh_testdir
@@ -105,10 +113,13 @@
 	dh_strip --dbg-package=ffmpeg-dbg
 	dh_compress
 	dh_fixperms
-	for pkg in $(LIB_PKGS); do \
-	    upkg=$$(echo "$$pkg" | sed -r 's/([0-9]+)$$/-unstripped-\1/'); \
-	    dh_makeshlibs -p"$$pkg" -V"$$pkg (>= $(SHLIBS_VERSION)) | $$upkg (>= $(SHLIBS_VERSION))"; \
-	done
+#	NB: The following is pretty whitespace sensitive
+	$(call call_dh_makeshlibs,libavutil,49)
+	$(call call_dh_makeshlibs,libavcodec,51)
+	$(call call_dh_makeshlibs,libavdevice,52)
+	$(call call_dh_makeshlibs,libpostproc,51)
+	$(call call_dh_makeshlibs,libavformat,52)
+	$(call call_dh_makeshlibs,libswscale,0)
 	dh_installdeb
 	dh_shlibdeps
 	dh_gencontrol -- -Vlib1394-dev="$(lib1394-dev)"
@@ -117,9 +128,9 @@
 
 binary: binary-indep binary-arch
 
-.PHONY: build $(addprefix build-, $(FLAVORS)) build-doxy \
+.PHONY: build build-shared build-static build-doxy \
 	clean clean-real \
-	configure $(addprefix configure-, $(FLAVORS)) \
+	configure configure-shared configure-static \
 	binary binary-indep binary-arch \
 	install \
-	get-orig-source
+	patch




More information about the pkg-multimedia-commits mailing list