summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ffmpeg/A01-mpegleak.patch62
-rw-r--r--contrib/ffmpeg/A01-swscale-assert.patch15
-rw-r--r--contrib/ffmpeg/A02-audioconvert.patch13
-rw-r--r--contrib/ffmpeg/A03-png-sequences.patch12
-rw-r--r--contrib/ffmpeg/A04-channel-layout-order.patch103
-rw-r--r--contrib/ffmpeg/A05-asf-seek.patch16
-rw-r--r--contrib/ffmpeg/A06-h264-recovery-point.patch48
-rw-r--r--contrib/ffmpeg/A07-swscale-stack-alignment.patch13
-rw-r--r--contrib/ffmpeg/A08-vc1-decode.patch40
-rw-r--r--contrib/ffmpeg/A09-pgs-pts.patch30
-rw-r--r--contrib/ffmpeg/P01-solaris.patch4
-rw-r--r--contrib/ffmpeg/P02-darwin-pic.patch8
-rw-r--r--contrib/ffmpeg/P04-darwin-memalign.patch4
-rw-r--r--contrib/ffmpeg/module.defs14
14 files changed, 112 insertions, 270 deletions
diff --git a/contrib/ffmpeg/A01-mpegleak.patch b/contrib/ffmpeg/A01-mpegleak.patch
deleted file mode 100644
index 214e9caf9..000000000
--- a/contrib/ffmpeg/A01-mpegleak.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-diff --git a/libavcodec/h264.c b/libavcodec/h264.c
-index 9889224..041fccf 100644
---- a/libavcodec/h264.c
-+++ b/libavcodec/h264.c
-@@ -3848,7 +3848,7 @@ static int decode_frame(AVCodecContext *avctx,
- if(!(s->flags2 & CODEC_FLAG2_CHUNKS) && !s->current_picture_ptr){
- if (avctx->skip_frame >= AVDISCARD_NONREF)
- return 0;
-- av_log(avctx, AV_LOG_ERROR, "no frame!\n");
-+ av_log(avctx, AV_LOG_DEBUG, "no frame!\n");
- return -1;
- }
-
-diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
-index 1f30916..dce88f3 100644
---- a/libavcodec/h264_refs.c
-+++ b/libavcodec/h264_refs.c
-@@ -634,7 +634,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){
- * stream. Need to discard one frame. Prevents overrun of the
- * short_ref and long_ref buffers.
- */
-- av_log(h->s.avctx, AV_LOG_ERROR,
-+ av_log(h->s.avctx, AV_LOG_DEBUG,
- "number of reference frames (%d+%d) exceeds max (%d; probably "
- "corrupt input), discarding one\n",
- h->long_ref_count, h->short_ref_count, h->sps.ref_frame_count);
-diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
-index e418e95..87cb73c 100644
---- a/libavcodec/mpegvideo.c
-+++ b/libavcodec/mpegvideo.c
-@@ -1004,19 +1004,18 @@ int ff_find_unused_picture(MpegEncContext *s, int shared){
- }
-
- av_log(s->avctx, AV_LOG_FATAL, "Internal error, picture buffer overflow\n");
-- /* We could return -1, but the codec would crash trying to draw into a
-- * non-existing frame anyway. This is safer than waiting for a random crash.
-- * Also the return of this is never useful, an encoder must only allocate
-- * as much as allowed in the specification. This has no relationship to how
-- * much libavcodec could allocate (and MAX_PICTURE_COUNT is always large
-- * enough for such valid streams).
-- * Plus, a decoder has to check stream validity and remove frames if too
-- * many reference frames are around. Waiting for "OOM" is not correct at
-- * all. Similarly, missing reference frames have to be replaced by
-- * interpolated/MC frames, anything else is a bug in the codec ...
-- */
-- abort();
-- return -1;
-+ /* XXX there seems to be a leak caused by h264 in mpeg transport
-+ * streams: Over-the-air streams have a lot of errors. A picture
-+ * may be marked as referenced but the actual references get lost
-+ * so it never gets released. We take care of that here by releasing
-+ * the oldest we have & reusing its slot. */
-+ int oldest=0;
-+ for(i=0; i<MAX_PICTURE_COUNT; i++){
-+ if (s->picture[i].f.coded_picture_number < s->picture[oldest].f.coded_picture_number)
-+ oldest = i;
-+ }
-+ s->avctx->release_buffer(s->avctx, (AVFrame*)&s->picture[oldest]);
-+ return oldest;
- }
-
- static void update_noise_reduction(MpegEncContext *s){
diff --git a/contrib/ffmpeg/A01-swscale-assert.patch b/contrib/ffmpeg/A01-swscale-assert.patch
new file mode 100644
index 000000000..8136a35b2
--- /dev/null
+++ b/contrib/ffmpeg/A01-swscale-assert.patch
@@ -0,0 +1,15 @@
+diff --git a/libswscale/utils.c b/libswscale/utils.c
+index d8fee58..b96a771 100644
+--- a/libswscale/utils.c
++++ b/libswscale/utils.c
+@@ -508,7 +508,9 @@ static int initFilter(int16_t **outFilter, int32_t **filterPos,
+ // FIXME try to align filterPos if possible
+
+ // fix borders
+- if (is_horizontal) {
++ // This "horizontal" only check causes a subsequent assert when
++ // upscaling.
++ /*if (is_horizontal)*/ {
+ for (i = 0; i < dstW; i++) {
+ int j;
+ if ((*filterPos)[i] < 0) {
diff --git a/contrib/ffmpeg/A02-audioconvert.patch b/contrib/ffmpeg/A02-audioconvert.patch
deleted file mode 100644
index 5248a9fd3..000000000
--- a/contrib/ffmpeg/A02-audioconvert.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/libavcodec/Makefile b/libavcodec/Makefile
-index 3c4e2f8..fe84b8c 100644
---- a/libavcodec/Makefile
-+++ b/libavcodec/Makefile
-@@ -1,7 +1,7 @@
- NAME = avcodec
- FFLIBS = avutil
-
--HEADERS = avcodec.h avfft.h dxva2.h opt.h vaapi.h vdpau.h version.h xvmc.h
-+HEADERS = avcodec.h avfft.h dxva2.h opt.h vaapi.h vdpau.h version.h xvmc.h audioconvert.h
-
- OBJS = allcodecs.o \
- audioconvert.o \
diff --git a/contrib/ffmpeg/A03-png-sequences.patch b/contrib/ffmpeg/A03-png-sequences.patch
index 66fe1f7c3..6098c3150 100644
--- a/contrib/ffmpeg/A03-png-sequences.patch
+++ b/contrib/ffmpeg/A03-png-sequences.patch
@@ -1,8 +1,8 @@
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
-index a40cebb..26239e2 100644
+index 871f2b2..cba2e90 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
-@@ -599,6 +599,18 @@ static int decode_frame(AVCodecContext *avctx,
+@@ -592,6 +592,24 @@ static int decode_frame(AVCodecContext *avctx,
}
}
exit_loop:
@@ -16,12 +16,18 @@ index a40cebb..26239e2 100644
+ * It offers a similar solution; forces code block to be skipped.
+ *
+ * --kb
++ *
++ * The "fix" in r19079 was a hack placed in avcodec_decode_video.
++ * avcodec_decode_video was obsoleted and no longer exists. The
++ * "fix" disappeared with it.
++ *
++ * --jas
+ */
+#if 0
/* handle p-frames only if a predecessor frame is available */
if(s->last_picture->data[0] != NULL) {
if(!(avpkt->flags & AV_PKT_FLAG_KEY)) {
-@@ -615,6 +627,7 @@ static int decode_frame(AVCodecContext *avctx,
+@@ -608,6 +626,7 @@ static int decode_frame(AVCodecContext *avctx,
}
}
}
diff --git a/contrib/ffmpeg/A04-channel-layout-order.patch b/contrib/ffmpeg/A04-channel-layout-order.patch
index 99faa5ddc..2326e7d3e 100644
--- a/contrib/ffmpeg/A04-channel-layout-order.patch
+++ b/contrib/ffmpeg/A04-channel-layout-order.patch
@@ -1,84 +1,39 @@
-diff --git a/libavcodec/Makefile b/libavcodec/Makefile
-index 3c4e2f8..5cfd1bf 100644
---- a/libavcodec/Makefile
-+++ b/libavcodec/Makefile
-@@ -142,7 +142,7 @@ OBJS-$(CONFIG_FFV1_DECODER) += ffv1.o rangecoder.o
- OBJS-$(CONFIG_FFV1_ENCODER) += ffv1.o rangecoder.o
- OBJS-$(CONFIG_FFVHUFF_DECODER) += huffyuv.o
- OBJS-$(CONFIG_FFVHUFF_ENCODER) += huffyuv.o
--OBJS-$(CONFIG_FLAC_DECODER) += flacdec.o flacdata.o flac.o
-+OBJS-$(CONFIG_FLAC_DECODER) += flacdec.o flacdata.o flac.o vorbis_data.o
- OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o
- OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o
- OBJS-$(CONFIG_FLASHSV_ENCODER) += flashsvenc.o
-diff --git a/libavcodec/flac.c b/libavcodec/flac.c
-index e6a427a..397155e 100644
---- a/libavcodec/flac.c
-+++ b/libavcodec/flac.c
-@@ -22,6 +22,7 @@
- #include "libavutil/crc.h"
- #include "flac.h"
- #include "flacdata.h"
-+#include "vorbis.h"
-
- static const int8_t sample_size_table[] = { 0, 8, 12, 0, 16, 20, 24, 0 };
-
-@@ -54,9 +55,12 @@ int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
- fi->ch_mode = get_bits(gb, 4);
- if (fi->ch_mode < FLAC_MAX_CHANNELS) {
- fi->channels = fi->ch_mode + 1;
-+ if (fi->ch_mode <= 5)
-+ avctx->channel_layout = ff_vorbis_channel_layouts[fi->ch_mode];
- fi->ch_mode = FLAC_CHMODE_INDEPENDENT;
- } else if (fi->ch_mode <= FLAC_CHMODE_MID_SIDE) {
- fi->channels = 2;
-+ avctx->channel_layout = AV_CH_LAYOUT_STEREO;
- } else {
- av_log(avctx, AV_LOG_ERROR + log_level_offset,
- "invalid channel mode: %d\n", fi->ch_mode);
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
-index c90285a..58235c8 100644
+index 91efaf3..e6c5c8e 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
-@@ -133,6 +133,9 @@ typedef struct MLPDecodeContext {
- //! Index of the last substream to decode - further substreams are skipped.
- uint8_t max_decoded_substream;
-
-+ //! Stream needs channel reordering to comply with FFmpeg's channel order
-+ uint8_t needs_reordering;
-+
- //! number of PCM samples contained in each frame
- int access_unit_size;
- //! next power of two above the number of samples in each frame
-@@ -326,6 +329,8 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
- for (substr = 0; substr < MAX_SUBSTREAMS; substr++)
- m->substream[substr].restart_seen = 0;
-
-+ m->needs_reordering = mh.channels_mlp >= 18 && mh.channels_mlp <= 20;
-+
- return 0;
- }
-
-@@ -436,6 +441,24 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
+@@ -30,6 +30,7 @@
+ #include "dsputil.h"
+ #include "libavutil/intreadwrite.h"
+ #include "get_bits.h"
++#include "libavutil/audioconvert.h"
+ #include "libavutil/crc.h"
+ #include "parser.h"
+ #include "mlp_parser.h"
+@@ -434,6 +435,28 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
s->ch_assign[ch_assign] = ch;
}
-+ if (m->avctx->codec_id == CODEC_ID_MLP && m->needs_reordering) {
-+ if (m->avctx->channel_layout == (AV_CH_LAYOUT_2_2|AV_CH_LOW_FREQUENCY) ||
-+ m->avctx->channel_layout == AV_CH_LAYOUT_5POINT0) {
-+ int i = s->ch_assign[4];
-+ s->ch_assign[4] = s->ch_assign[3];
-+ s->ch_assign[3] = s->ch_assign[2];
-+ s->ch_assign[2] = i;
-+ } else if (m->avctx->channel_layout == AV_CH_LAYOUT_5POINT1) {
-+ FFSWAP(int, s->ch_assign[2], s->ch_assign[4]);
-+ FFSWAP(int, s->ch_assign[3], s->ch_assign[5]);
++ if (m->avctx->codec_id == CODEC_ID_TRUEHD) {
++ switch (m->avctx->channel_layout) {
++ case AV_CH_LAYOUT_6POINT1:
++ case (AV_CH_LAYOUT_6POINT1|AV_CH_TOP_CENTER):
++ case (AV_CH_LAYOUT_6POINT1|AV_CH_TOP_FRONT_CENTER):
++ {
++ int i = s->ch_assign[6];
++ s->ch_assign[6] = s->ch_assign[5];
++ s->ch_assign[5] = s->ch_assign[4];
++ s->ch_assign[4] = i;
++ break;
++ }
++ case AV_CH_LAYOUT_7POINT1:
++ case (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER):
++ FFSWAP(int, s->ch_assign[4], s->ch_assign[6]);
++ FFSWAP(int, s->ch_assign[5], s->ch_assign[7]);
++ break;
++ default:
++ break;
+ }
-+ }
-+ if (m->avctx->codec_id == CODEC_ID_TRUEHD &&
-+ m->avctx->channel_layout == AV_CH_LAYOUT_7POINT1) {
-+ FFSWAP(int, s->ch_assign[4], s->ch_assign[6]);
-+ FFSWAP(int, s->ch_assign[5], s->ch_assign[7]);
+ }
+
checksum = ff_mlp_restart_checksum(buf, get_bits_count(gbp) - start_count);
diff --git a/contrib/ffmpeg/A05-asf-seek.patch b/contrib/ffmpeg/A05-asf-seek.patch
deleted file mode 100644
index c19ad496b..000000000
--- a/contrib/ffmpeg/A05-asf-seek.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
-index 0245340..85b2649 100644
---- a/libavformat/asfdec.c
-+++ b/libavformat/asfdec.c
-@@ -1172,7 +1172,10 @@ static int64_t asf_read_pts(AVFormatContext *s, int stream_index, int64_t *ppos,
- return AV_NOPTS_VALUE;
- }
-
-- pts= pkt->pts;
-+ if (pkt->pts == AV_NOPTS_VALUE)
-+ pts = pkt->dts;
-+ else
-+ pts = pkt->pts;
-
- av_free_packet(pkt);
- if(pkt->flags&AV_PKT_FLAG_KEY){
diff --git a/contrib/ffmpeg/A06-h264-recovery-point.patch b/contrib/ffmpeg/A06-h264-recovery-point.patch
index 61442bd44..d018dd6b1 100644
--- a/contrib/ffmpeg/A06-h264-recovery-point.patch
+++ b/contrib/ffmpeg/A06-h264-recovery-point.patch
@@ -1,41 +1,41 @@
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
-index 9889224..ae77285 100644
+index 6ed251e..a3242ce 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
-@@ -2229,6 +2229,7 @@ static void flush_dpb(AVCodecContext *avctx){
- h->s.first_field= 0;
+@@ -2627,6 +2627,7 @@ static void flush_dpb(AVCodecContext *avctx)
+ h->s.first_field = 0;
ff_h264_reset_sei(h);
ff_mpeg_flush(avctx);
+ h->recovery_frame= -1;
}
- static int init_poc(H264Context *h){
-@@ -3654,9 +3655,18 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
- if((err = decode_slice_header(hx, h)))
- break;
+ static int init_poc(H264Context *h)
+@@ -4289,9 +4290,18 @@ again:
+ if ((err = decode_slice_header(hx, h)))
+ break;
-+ if (h->sei_recovery_frame_cnt >= 0 && h->recovery_frame < 0) {
-+ h->recovery_frame = (h->frame_num + h->sei_recovery_frame_cnt) %
-+ (1 << h->sps.log2_max_frame_num);
-+ }
++ if (h->sei_recovery_frame_cnt >= 0 && h->recovery_frame < 0) {
++ h->recovery_frame = (h->frame_num + h->sei_recovery_frame_cnt) %
++ (1 << h->sps.log2_max_frame_num);
++ }
+
- s->current_picture_ptr->f.key_frame |=
+ s->current_picture_ptr->f.key_frame |=
- (hx->nal_unit_type == NAL_IDR_SLICE) ||
- (h->sei_recovery_frame_cnt >= 0);
-+ (hx->nal_unit_type == NAL_IDR_SLICE);
++ (hx->nal_unit_type == NAL_IDR_SLICE);
+
-+ if (h->recovery_frame == h->frame_num) {
-+ s->current_picture_ptr->f.key_frame |= 1;
-+ h->recovery_frame = -1;
-+ }
++ if (h->recovery_frame == h->frame_num) {
++ s->current_picture_ptr->f.key_frame |= 1;
++ h->recovery_frame = -1;
++ }
- if (h->current_slice == 1) {
- if(!(s->flags2 & CODEC_FLAG2_CHUNKS)) {
+ if (h->current_slice == 1) {
+ if (!(s->flags2 & CODEC_FLAG2_CHUNKS))
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
-index 122a54a..cd044b0 100644
+index 570ce2f..454b755 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
-@@ -575,6 +575,13 @@ typedef struct H264Context{
+@@ -569,6 +569,13 @@ typedef struct H264Context {
* frames.
*/
int sei_recovery_frame_cnt;
@@ -47,10 +47,10 @@ index 122a54a..cd044b0 100644
+ */
+ int recovery_frame;
- int luma_weight_flag[2]; ///< 7.4.3.2 luma_weight_lX_flag
- int chroma_weight_flag[2]; ///< 7.4.3.2 chroma_weight_lX_flag
+ int luma_weight_flag[2]; ///< 7.4.3.2 luma_weight_lX_flag
+ int chroma_weight_flag[2]; ///< 7.4.3.2 chroma_weight_lX_flag
diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
-index 4f52bbe..8d3c40b 100644
+index 2e5fb65..ea33a18 100644
--- a/libavcodec/h264_sei.c
+++ b/libavcodec/h264_sei.c
@@ -38,6 +38,7 @@ static const uint8_t sei_num_clock_ts_table[9]={
diff --git a/contrib/ffmpeg/A07-swscale-stack-alignment.patch b/contrib/ffmpeg/A07-swscale-stack-alignment.patch
deleted file mode 100644
index 6d3bb35ce..000000000
--- a/contrib/ffmpeg/A07-swscale-stack-alignment.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
-index c0161c2..c7e6a28 100644
---- a/libswscale/swscale_unscaled.c
-+++ b/libswscale/swscale_unscaled.c
-@@ -806,7 +806,7 @@ static int check_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt,
- * swscale wrapper, so we don't need to export the SwsContext.
- * Assumes planar YUV to be in YUV order instead of YVU.
- */
--int sws_scale(struct SwsContext *c, const uint8_t* const srcSlice[],
-+int attribute_align_arg sws_scale(struct SwsContext *c, const uint8_t* const srcSlice[],
- const int srcStride[], int srcSliceY, int srcSliceH,
- uint8_t* const dst[], const int dstStride[])
- {
diff --git a/contrib/ffmpeg/A08-vc1-decode.patch b/contrib/ffmpeg/A08-vc1-decode.patch
deleted file mode 100644
index 61c0724a0..000000000
--- a/contrib/ffmpeg/A08-vc1-decode.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
-index 60cca33..1b03215 100644
---- a/libavcodec/vc1dec.c
-+++ b/libavcodec/vc1dec.c
-@@ -3317,7 +3317,7 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n,
- i += skip;
- if (i > 63)
- break;
-- if (!v->interlace)
-+ if (!v->fcm)
- idx = v->zz_8x8[0][i++];
- else
- idx = v->zzi_8x8[i++];
-@@ -3345,7 +3345,7 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n,
- i += skip;
- if (i > 15)
- break;
-- if (!v->interlace)
-+ if (!v->fcm)
- idx = ff_vc1_simple_progressive_4x4_zz[i++];
- else
- idx = ff_vc1_adv_interlaced_4x4_zz[i++];
-@@ -3372,7 +3372,7 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n,
- i += skip;
- if (i > 31)
- break;
-- if (!v->interlace)
-+ if (!v->fcm)
- idx = v->zz_8x4[i++] + off;
- else
- idx = ff_vc1_adv_interlaced_8x4_zz[i++] + off;
-@@ -3399,7 +3399,7 @@ static int vc1_decode_p_block(VC1Context *v, DCTELEM block[64], int n,
- i += skip;
- if (i > 31)
- break;
-- if (!v->interlace)
-+ if (!v->fcm)
- idx = v->zz_4x8[i++] + off;
- else
- idx = ff_vc1_adv_interlaced_4x8_zz[i++] + off;
diff --git a/contrib/ffmpeg/A09-pgs-pts.patch b/contrib/ffmpeg/A09-pgs-pts.patch
index b03f5acce..fe6a6dc93 100644
--- a/contrib/ffmpeg/A09-pgs-pts.patch
+++ b/contrib/ffmpeg/A09-pgs-pts.patch
@@ -1,18 +1,20 @@
-diff -Naur ffmpeg-v0.7-1696-gcae4f4b.orig/libavcodec/avcodec.h ffmpeg-v0.7-1696-gcae4f4b/libavcodec/avcodec.h
---- ffmpeg-v0.7-1696-gcae4f4b.orig/libavcodec/avcodec.h 2011-11-03 12:29:48.000000000 +0100
-+++ ffmpeg-v0.7-1696-gcae4f4b/libavcodec/avcodec.h 2012-04-22 10:59:41.122351884 +0200
-@@ -3193,6 +3193,7 @@
+diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
+index 102df3a..aa40c78 100644
+--- a/libavcodec/avcodec.h
++++ b/libavcodec/avcodec.h
+@@ -3093,6 +3093,7 @@ typedef struct AVSubtitle {
unsigned num_rects;
AVSubtitleRect **rects;
int64_t pts; ///< Same as packet pts, in AV_TIME_BASE
+ uint8_t forced;
} AVSubtitle;
- /* packet functions */
-diff -Naur ffmpeg-v0.7-1696-gcae4f4b.orig/libavcodec/pgssubdec.c ffmpeg-v0.7-1696-gcae4f4b/libavcodec/pgssubdec.c
---- ffmpeg-v0.7-1696-gcae4f4b.orig/libavcodec/pgssubdec.c 2011-11-03 12:29:48.000000000 +0100
-+++ ffmpeg-v0.7-1696-gcae4f4b/libavcodec/pgssubdec.c 2012-04-22 13:09:29.499671541 +0200
-@@ -45,6 +45,8 @@
+ /**
+diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
+index 3335412..3f14a2d 100644
+--- a/libavcodec/pgssubdec.c
++++ b/libavcodec/pgssubdec.c
+@@ -45,6 +45,8 @@ typedef struct PGSSubPresentation {
int y;
int id_number;
int object_number;
@@ -21,7 +23,7 @@ diff -Naur ffmpeg-v0.7-1696-gcae4f4b.orig/libavcodec/pgssubdec.c ffmpeg-v0.7-169
} PGSSubPresentation;
typedef struct PGSSubPicture {
-@@ -271,7 +273,8 @@
+@@ -271,7 +273,8 @@ static void parse_palette_segment(AVCodecContext *avctx,
* @todo TODO: Implement forcing of subtitles
*/
static void parse_presentation_segment(AVCodecContext *avctx,
@@ -31,7 +33,7 @@ diff -Naur ffmpeg-v0.7-1696-gcae4f4b.orig/libavcodec/pgssubdec.c ffmpeg-v0.7-169
{
PGSSubContext *ctx = avctx->priv_data;
-@@ -280,6 +283,8 @@
+@@ -280,6 +283,8 @@ static void parse_presentation_segment(AVCodecContext *avctx,
int w = bytestream_get_be16(&buf);
int h = bytestream_get_be16(&buf);
@@ -40,7 +42,7 @@ diff -Naur ffmpeg-v0.7-1696-gcae4f4b.orig/libavcodec/pgssubdec.c ffmpeg-v0.7-169
av_dlog(avctx, "Video Dimensions %dx%d\n",
w, h);
if (av_image_check_size(w, h, 0, avctx) >= 0)
-@@ -299,16 +304,17 @@
+@@ -299,16 +304,17 @@ static void parse_presentation_segment(AVCodecContext *avctx,
buf += 3;
ctx->presentation.object_number = bytestream_get_byte(&buf);
@@ -61,7 +63,7 @@ diff -Naur ffmpeg-v0.7-1696-gcae4f4b.orig/libavcodec/pgssubdec.c ffmpeg-v0.7-169
x = bytestream_get_be16(&buf);
y = bytestream_get_be16(&buf);
-@@ -356,6 +362,9 @@
+@@ -356,6 +362,9 @@ static int display_end_segment(AVCodecContext *avctx, void *data,
*/
memset(sub, 0, sizeof(*sub));
@@ -71,7 +73,7 @@ diff -Naur ffmpeg-v0.7-1696-gcae4f4b.orig/libavcodec/pgssubdec.c ffmpeg-v0.7-169
// Blank if last object_number was 0.
// Note that this may be wrong for more complex subtitles.
if (!ctx->presentation.object_number)
-@@ -441,7 +450,7 @@
+@@ -441,7 +450,7 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size,
parse_picture_segment(avctx, buf, segment_length);
break;
case PRESENTATION_SEGMENT:
diff --git a/contrib/ffmpeg/P01-solaris.patch b/contrib/ffmpeg/P01-solaris.patch
index d9bb05be2..8266d0914 100644
--- a/contrib/ffmpeg/P01-solaris.patch
+++ b/contrib/ffmpeg/P01-solaris.patch
@@ -1,5 +1,5 @@
diff --git a/configure b/configure
-index e01d9fd..69ba7ea 100755
+index 07baa2f..4597a0d 100755
--- a/configure
+++ b/configure
@@ -54,6 +54,9 @@ if test "$E1" != 0 || test "$E2" = 0; then
@@ -12,7 +12,7 @@ index e01d9fd..69ba7ea 100755
show_help(){
cat <<EOF
Usage: configure [options]
-@@ -2603,7 +2606,7 @@ EOF
+@@ -2688,7 +2691,7 @@ EOF
check_cc <<EOF || die "endian test failed"
unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
EOF
diff --git a/contrib/ffmpeg/P02-darwin-pic.patch b/contrib/ffmpeg/P02-darwin-pic.patch
index e93180fd3..e9d8dfc00 100644
--- a/contrib/ffmpeg/P02-darwin-pic.patch
+++ b/contrib/ffmpeg/P02-darwin-pic.patch
@@ -1,8 +1,8 @@
diff --git a/configure b/configure
-index e01d9fd..d5d6aec 100755
+index 07baa2f..8a2a581 100755
--- a/configure
+++ b/configure
-@@ -2413,6 +2413,7 @@ case $target_os in
+@@ -2494,6 +2494,7 @@ case $target_os in
AVSERVERLDFLAGS=-Wl,-bind_at_load
objformat="macho"
enabled x86_64 && objformat="macho64"
@@ -10,9 +10,9 @@ index e01d9fd..d5d6aec 100755
enabled_any pic shared ||
{ check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
;;
-@@ -2530,7 +2531,7 @@ esac
+@@ -2614,7 +2615,7 @@ esc(){
- echo "config:$arch:$subarch:$cpu:$target_os:$cc_ident:$LIBAV_CONFIGURATION" >config.fate
+ echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $LIBAV_CONFIGURATION)" >config.fate
-check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
+#check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
diff --git a/contrib/ffmpeg/P04-darwin-memalign.patch b/contrib/ffmpeg/P04-darwin-memalign.patch
index 7c669b35b..0747dfa3c 100644
--- a/contrib/ffmpeg/P04-darwin-memalign.patch
+++ b/contrib/ffmpeg/P04-darwin-memalign.patch
@@ -1,8 +1,8 @@
diff --git a/libavutil/mem.c b/libavutil/mem.c
-index 27bb30b..6f29363 100644
+index bf1a542..a32d400 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
-@@ -80,6 +80,11 @@ void *av_malloc(size_t size)
+@@ -82,6 +82,11 @@ void *av_malloc(size_t size)
ptr = (char*)ptr + diff;
((char*)ptr)[-1]= diff;
#elif HAVE_POSIX_MEMALIGN
diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs
index 0d4f4eaac..a6a824fda 100644
--- a/contrib/ffmpeg/module.defs
+++ b/contrib/ffmpeg/module.defs
@@ -1,7 +1,7 @@
$(eval $(call import.MODULE.defs,FFMPEG,ffmpeg,YASM BZIP2 ZLIB))
$(eval $(call import.CONTRIB.defs,FFMPEG))
-FFMPEG.FETCH.url = http://download.handbrake.fr/handbrake/contrib/ffmpeg-v0.7-1696-gcae4f4b.tar.bz2
+FFMPEG.FETCH.url = http://download.handbrake.fr/handbrake/contrib/libav-v0.8-2197-g1a068bf.tar.bz2
FFMPEG.CONFIGURE.deps =
FFMPEG.CONFIGURE.env =
@@ -11,7 +11,8 @@ FFMPEG.CONFIGURE.extra = \
--disable-doc \
--disable-bsfs \
--disable-encoders \
- --disable-ffmpeg \
+ --disable-vda \
+ --disable-vdpau \
--disable-avconv \
--disable-avplay \
--disable-avprobe \
@@ -30,7 +31,6 @@ FFMPEG.CONFIGURE.extra = \
--enable-gpl \
--enable-zlib \
--cc="$(FFMPEG.GCC.gcc)" \
- --extra-cflags="$(call fn.ARGS,FFMPEG.GCC,*archs *sysroot *minver ?extra) -I$(call fn.ABSOLUTE,$(CONTRIB.build/)include)" \
--extra-ldflags="$(call fn.ARGS,FFMPEG.GCC,*archs *sysroot *minver ?extra) -L$(call fn.ABSOLUTE,$(CONTRIB.build/)lib)"
## check against tuple: B-SYSTEM where B is { 0 | 1 } for cross-compiling flag
@@ -54,8 +54,16 @@ endif
ifneq (none,$(FFMPEG.GCC.g))
FFMPEG.CONFIGURE.extra += --enable-debug
+
+ifeq (max,$(FFMPEG.GCC.g))
+ FFMPEG.CONFIGURE.extra += --extra-cflags="$(call fn.ARGS,FFMPEG.GCC,*archs *sysroot *minver ?extra) -I$(call fn.ABSOLUTE,$(CONTRIB.build/)include) -DDEBUG"
+else
+ FFMPEG.CONFIGURE.extra += --extra-cflags="$(call fn.ARGS,FFMPEG.GCC,*archs *sysroot *minver ?extra) -I$(call fn.ABSOLUTE,$(CONTRIB.build/)include) -DNDEBUG"
+endif
+
else
FFMPEG.CONFIGURE.extra += --disable-debug
+ FFMPEG.CONFIGURE.extra += --extra-cflags="$(call fn.ARGS,FFMPEG.GCC,*archs *sysroot *minver ?extra) -I$(call fn.ABSOLUTE,$(CONTRIB.build/)include) -DNDEBUG"
endif
ifeq (none,$(FFMPEG.GCC.O))