summaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg/patches
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/ffmpeg/patches')
-rw-r--r--multimedia/ffmpeg/patches/patch-4xm22
-rw-r--r--multimedia/ffmpeg/patches/patch-bktr25
-rw-r--r--multimedia/ffmpeg/patches/patch-configure64
-rw-r--r--multimedia/ffmpeg/patches/patch-imgconvert.c18
-rw-r--r--multimedia/ffmpeg/patches/patch-libavcodec_Makefile12
-rw-r--r--multimedia/ffmpeg/patches/patch-mem.c42
-rw-r--r--multimedia/ffmpeg/patches/patch-oldx24646
-rw-r--r--multimedia/ffmpeg/patches/patch-r1447716
-rw-r--r--multimedia/ffmpeg/patches/patch-v4l220
9 files changed, 14 insertions, 251 deletions
diff --git a/multimedia/ffmpeg/patches/patch-4xm b/multimedia/ffmpeg/patches/patch-4xm
deleted file mode 100644
index 9bdb96d0351..00000000000
--- a/multimedia/ffmpeg/patches/patch-4xm
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-4xm,v 1.1 2009/01/29 15:02:13 tron Exp $
-
-Patch for buffer overflow based on this change:
-http://svn.ffmpeg.org/ffmpeg/trunk/libavformat/4xm.c?r1=16838&r2=16846
-
---- libavformat/4xm.c.orig 2009-01-29 14:33:19.000000000 +0000
-+++ libavformat/4xm.c 2009-01-29 14:37:44.000000000 +0000
-@@ -163,10 +163,12 @@
- return AVERROR_INVALIDDATA;
- }
- current_track = AV_RL32(&header[i + 8]);
-+ if((unsigned)current_track >= UINT_MAX / sizeof(AudioTrack) - 1){
-+ av_log(s, AV_LOG_ERROR, "current_track too large\n");
-+ 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) {
diff --git a/multimedia/ffmpeg/patches/patch-bktr b/multimedia/ffmpeg/patches/patch-bktr
index 0a2fdcc8c92..f2586378296 100644
--- a/multimedia/ffmpeg/patches/patch-bktr
+++ b/multimedia/ffmpeg/patches/patch-bktr
@@ -1,13 +1,16 @@
-$NetBSD: patch-bktr,v 1.1 2008/09/07 23:39:38 ahoka Exp $
+$NetBSD: patch-bktr,v 1.2 2009/06/12 16:25:34 ahoka Exp $
---- libavdevice/bktr.c.orig 2008-06-03 18:20:54.000000000 +0200
+--- libavdevice/bktr.c.orig 2009-01-19 16:46:40.000000000 +0100
+++ libavdevice/bktr.c
-@@ -31,7 +31,7 @@
- #elif defined (HAVE_MACHINE_IOCTL_METEOR_H) && defined (HAVE_MACHINE_IOCTL_BT848_H)
- # include <machine/ioctl_meteor.h>
- # include <machine/ioctl_bt848.h>
--#elif defined (HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H) && defined (HAVE_DEV_VIDEO_METEOR_IOCTL_BT848_H)
-+#elif defined (HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H) && defined (HAVE_DEV_VIDEO_BKTR_IOCTL_BT848_H)
- # include <dev/video/meteor/ioctl_meteor.h>
- # include <dev/video/bktr/ioctl_bt848.h>
- #elif HAVE_DEV_IC_BT8XX_H
+@@ -24,7 +24,11 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++/* u_short, u_int */
+ #define _BSD_SOURCE 1
++#ifdef __NetBSD__
++# define _NETBSD_SOURCE 1
++#endif
+ #include "libavformat/avformat.h"
+ #if HAVE_DEV_BKTR_IOCTL_METEOR_H && HAVE_DEV_BKTR_IOCTL_BT848_H
+ # include <dev/bktr/ioctl_meteor.h>
diff --git a/multimedia/ffmpeg/patches/patch-configure b/multimedia/ffmpeg/patches/patch-configure
deleted file mode 100644
index f02506753cf..00000000000
--- a/multimedia/ffmpeg/patches/patch-configure
+++ /dev/null
@@ -1,64 +0,0 @@
-$NetBSD: patch-configure,v 1.3 2008/09/11 12:08:41 joerg Exp $
-
---- configure.orig 2008-07-24 12:53:32.000000000 +0200
-+++ configure
-@@ -763,6 +763,7 @@ HAVE_LIST="
- memalign
- mkstemp
- pld
-+ posix_memalign
- ppc64
- round
- roundf
-@@ -891,7 +892,7 @@ rtp_muxer_deps="network rtp_protocol"
- rtsp_demuxer_deps="sdp_demuxer"
- sdp_demuxer_deps="rtp_protocol mpegts_demuxer"
- v4l_demuxer_deps="linux_videodev_h"
--v4l2_demuxer_deps="linux_videodev2_h"
-+v4l2_demuxer_deps_any="linux_videodev2_h sys_videoio_h"
- vfwcap_demuxer_deps="capCreateCaptureWindow"
- vfwcap_demuxer_extralibs="-lvfw32"
- x11_grab_device_demuxer_deps="x11grab XShmCreateImage"
-@@ -1586,10 +1587,14 @@ enabled vis && add_cflags "-mcpu=ultrasp
-
- # ---
- # big/little-endian test
--check_cc <<EOF || die "endian test failed"
--unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
-+check_exec <<EOF || enable bigendian
-+int main()
-+{
-+ long one= 1;
-+ return !(*((char *)(&one)));
-+}
- EOF
--od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
-+
-
- # ---
- # check availability of some header files
-@@ -1605,6 +1610,7 @@ check_func gethrtime
- check_func getrusage
- check_func inet_aton $network_extralibs
- check_func memalign
-+check_func posix_memalign
- check_func mkstemp
- check_func2 windows.h GetProcessTimes
-
-@@ -1616,7 +1622,7 @@ check_header sys/mman.h
- check_header sys/resource.h
- check_header termios.h
-
--if ! enabled_any memalign memalign_hack && enabled need_memalign ; then
-+if ! enabled_any memalign memalign_hack posix_memalign && enabled need_memalign ; then
- die "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
- fi
-
-@@ -1789,6 +1795,7 @@ EOF
-
- check_header linux/videodev.h
- check_header linux/videodev2.h
-+check_header sys/videoio.h
-
- check_func2 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
-
diff --git a/multimedia/ffmpeg/patches/patch-imgconvert.c b/multimedia/ffmpeg/patches/patch-imgconvert.c
deleted file mode 100644
index 1995ccedbf8..00000000000
--- a/multimedia/ffmpeg/patches/patch-imgconvert.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- libavcodec/imgconvert.c.orig 2008-09-14 21:59:57.000000000 +0100
-+++ libavcodec/imgconvert.c 2008-09-14 22:00:56.000000000 +0100
-@@ -2108,7 +2108,6 @@
- }
- #endif
-
--#ifndef CONFIG_SWSCALE
- static uint8_t y_ccir_to_jpeg[256];
- static uint8_t y_jpeg_to_ccir[256];
- static uint8_t c_ccir_to_jpeg[256];
-@@ -2628,7 +2627,6 @@
- avpicture_free(tmp);
- return ret;
- }
--#endif
-
- /* NOTE: we scan all the pixels to have an exact information */
- static int get_alpha_info_pal8(const AVPicture *src, int width, int height)
diff --git a/multimedia/ffmpeg/patches/patch-libavcodec_Makefile b/multimedia/ffmpeg/patches/patch-libavcodec_Makefile
deleted file mode 100644
index ec1dd3fbfca..00000000000
--- a/multimedia/ffmpeg/patches/patch-libavcodec_Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
---- libavcodec/Makefile.orig 2008-09-14 21:58:12.000000000 +0100
-+++ libavcodec/Makefile 2008-09-14 21:58:36.000000000 +0100
-@@ -373,9 +373,7 @@
-
- OBJS-$(HAVE_XVMC) += xvmcvideo.o
-
--ifndef CONFIG_SWSCALE
- OBJS += imgresample.o
--endif
-
- # processor-specific code
- ifdef HAVE_MMX
diff --git a/multimedia/ffmpeg/patches/patch-mem.c b/multimedia/ffmpeg/patches/patch-mem.c
deleted file mode 100644
index 22453a655c5..00000000000
--- a/multimedia/ffmpeg/patches/patch-mem.c
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD: patch-mem.c,v 1.1 2008/09/11 12:08:41 joerg Exp $
-
---- libavutil/mem.c.orig 2008-05-23 14:37:52.000000000 +0200
-+++ libavutil/mem.c
-@@ -85,6 +85,9 @@ void *av_malloc(unsigned int size)
-
- btw, malloc seems to do 8 byte alignment by default here
- */
-+#elif defined (HAVE_MEMALIGN)
-+ if (posix_memalign(&ptr, 16, size))
-+ return NULL;
- #else
- ptr = malloc(size);
- #endif
-@@ -95,6 +98,8 @@ void *av_realloc(void *ptr, unsigned int
- {
- #ifdef CONFIG_MEMALIGN_HACK
- int diff;
-+#elif defined (HAVE_MEMALIGN)
-+ void *new_ptr;
- #endif
-
- /* let's disallow possible ambiguous cases */
-@@ -106,6 +111,18 @@ void *av_realloc(void *ptr, unsigned int
- if(!ptr) return av_malloc(size);
- diff= ((char*)ptr)[-1];
- return (char*)realloc((char*)ptr - diff, size + diff) + diff;
-+#elif defined (HAVE_MEMALIGN)
-+ new_ptr = realloc(ptr, size);
-+ if (((size_t)new_ptr & 15) == 0)
-+ return new_ptr;
-+
-+ if (posix_memalign(&ptr, 16, size)) {
-+ free(new_ptr);
-+ return NULL;
-+ }
-+ memcpy(ptr, new_ptr, size);
-+ free(new_ptr);
-+ return ptr;
- #else
- return realloc(ptr, size);
- #endif
diff --git a/multimedia/ffmpeg/patches/patch-oldx246 b/multimedia/ffmpeg/patches/patch-oldx246
deleted file mode 100644
index 64d16d42c62..00000000000
--- a/multimedia/ffmpeg/patches/patch-oldx246
+++ /dev/null
@@ -1,46 +0,0 @@
-$NetBSD: patch-oldx246,v 1.2 2008/12/18 16:31:53 bjs Exp $
-
---- libavcodec/libx264.c.orig 2008-12-09 04:46:35.000000000 -0500
-+++ libavcodec/libx264.c
-@@ -162,7 +162,11 @@ X264_init(AVCodecContext *avctx)
-
- x4->params.i_bframe = avctx->max_b_frames;
- x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC;
-+#if X264_BUILD > 62
-+ x4->params.i_bframe_adaptive = avctx->b_frame_strategy;
-+#else
- x4->params.b_bframe_adaptive = avctx->b_frame_strategy;
-+#endif
- x4->params.i_bframe_bias = avctx->bframebias;
- x4->params.b_bframe_pyramid = avctx->flags2 & CODEC_FLAG2_BPYRAMID;
- avctx->has_b_frames= avctx->flags2 & CODEC_FLAG2_BPYRAMID ? 2 : !!avctx->max_b_frames;
-@@ -220,15 +224,18 @@ X264_init(AVCodecContext *avctx)
- x4->params.analyse.i_me_method = X264_ME_UMH;
- else if(avctx->me_method == ME_FULL)
- x4->params.analyse.i_me_method = X264_ME_ESA;
-+#ifdef HAVE_X264_TESA
- else if(avctx->me_method == ME_TESA)
- x4->params.analyse.i_me_method = X264_ME_TESA;
-+#endif
- else x4->params.analyse.i_me_method = X264_ME_HEX;
-
- x4->params.analyse.i_me_range = avctx->me_range;
- x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
--
-+#if X264_BUILD < 65
- x4->params.analyse.b_bidir_me = avctx->bidir_refine > 0;
- x4->params.analyse.b_bframe_rdo = avctx->flags2 & CODEC_FLAG2_BRDO;
-+#endif
- x4->params.analyse.b_mixed_references =
- avctx->flags2 & CODEC_FLAG2_MIXED_REFS;
- x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA;
-@@ -253,7 +260,9 @@ X264_init(AVCodecContext *avctx)
- x4->params.rc.f_ip_factor = 1/fabs(avctx->i_quant_factor);
- x4->params.rc.f_pb_factor = avctx->b_quant_factor;
- x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
-+#if X264_BUILD < 61
- x4->params.rc.psz_rc_eq = avctx->rc_eq;
-+#endif
-
- x4->params.analyse.b_psnr = avctx->flags & CODEC_FLAG_PSNR;
- x4->params.i_log_level = X264_LOG_DEBUG;
diff --git a/multimedia/ffmpeg/patches/patch-r14477 b/multimedia/ffmpeg/patches/patch-r14477
deleted file mode 100644
index 60d3af07294..00000000000
--- a/multimedia/ffmpeg/patches/patch-r14477
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-r14477,v 1.1 2008/09/07 23:39:38 ahoka Exp $
-
-From ffmpeg svn. Remove after upgrading the ffmpeg.
-
---- libavformat/avidec.c 2008/07/04 13:05:06 14064
-+++ libavformat/avidec.c 2008/07/30 21:07:54 14477
-@@ -1026,8 +1026,7 @@
- continue;
-
- // assert(st2->codec->block_align);
-- assert(st2->time_base.den == ast2->rate);
-- assert(st2->time_base.num == ast2->scale);
-+ assert((int64_t)st2->time_base.num*ast2->rate == (int64_t)st2->time_base.den*ast2->scale);
- index = av_index_search_timestamp(
- st2,
- av_rescale(timestamp, st2->time_base.den*(int64_t)st->time_base.num, st->time_base.den * (int64_t)st2->time_base.num),
diff --git a/multimedia/ffmpeg/patches/patch-v4l2 b/multimedia/ffmpeg/patches/patch-v4l2
deleted file mode 100644
index b7a6ef3aade..00000000000
--- a/multimedia/ffmpeg/patches/patch-v4l2
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-v4l2,v 1.1 2008/09/07 23:39:38 ahoka Exp $
-
---- libavdevice/v4l2.c.orig 2008-07-15 22:45:42.000000000 +0200
-+++ libavdevice/v4l2.c
-@@ -34,8 +34,13 @@
- #include <sys/ioctl.h>
- #include <sys/mman.h>
- #include <sys/time.h>
--#include <asm/types.h>
--#include <linux/videodev2.h>
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
-+# include <sys/types.h>
-+# include <sys/videoio.h>
-+#else
-+# include <asm/types.h>
-+# include <linux/videodev2.h>
-+#endif
- #include <time.h>
-
- static const int desired_video_buffers = 256;