summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/ffmpeg/A00-mkv-simpleblock.patch13
-rw-r--r--contrib/ffmpeg/A01-mpegleak.patch7
-rw-r--r--contrib/ffmpeg/A02-audioconvert.patch4
-rw-r--r--contrib/ffmpeg/P03-mingw-gnu99.patch22
-rw-r--r--contrib/ffmpeg/P04-darwin-memalign.patch16
-rw-r--r--contrib/ffmpeg/module.defs2
-rw-r--r--libhb/decavcodec.c7
-rw-r--r--libhb/hb.c1
8 files changed, 30 insertions, 42 deletions
diff --git a/contrib/ffmpeg/A00-mkv-simpleblock.patch b/contrib/ffmpeg/A00-mkv-simpleblock.patch
deleted file mode 100644
index 9d24799ef..000000000
--- a/contrib/ffmpeg/A00-mkv-simpleblock.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
-index a356611..0b35f15 100644
---- a/libavformat/matroskadec.c
-+++ b/libavformat/matroskadec.c
-@@ -1852,6 +1852,8 @@ static int matroska_parse_cluster(MatroskaDemuxContext *matroska)
- for (i=0; i<blocks_list->nb_elem; i++)
- if (blocks[i].bin.size > 0 && blocks[i].bin.data) {
- int is_keyframe = blocks[i].non_simple ? !blocks[i].reference : -1;
-+ if (!blocks[i].non_simple)
-+ blocks[i].duration = AV_NOPTS_VALUE;
- res=matroska_parse_block(matroska,
- blocks[i].bin.data, blocks[i].bin.size,
- blocks[i].bin.pos, cluster.timecode,
diff --git a/contrib/ffmpeg/A01-mpegleak.patch b/contrib/ffmpeg/A01-mpegleak.patch
index 49e99456d..44a99274e 100644
--- a/contrib/ffmpeg/A01-mpegleak.patch
+++ b/contrib/ffmpeg/A01-mpegleak.patch
@@ -38,10 +38,11 @@ Index: libavcodec/h264.c
===================================================================
--- ffmpeg.orig/libavcodec/h264.c (revision 22823)
+++ ffmpeg/libavcodec/h264.c (working copy)
-@@ -2772,7 +2772,7 @@
+@@ -2772,8 +2772,8 @@
if(!(s->flags2 & CODEC_FLAG2_CHUNKS) && !s->current_picture_ptr){
- if (avctx->skip_frame >= AVDISCARD_NONREF || s->hurry_up) return 0;
+ 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;
@@ -57,6 +58,6 @@ Index: libavcodec/h264_refs.c
*/
- av_log(h->s.avctx, AV_LOG_ERROR,
+ av_log(h->s.avctx, AV_LOG_DEBUG,
- "number of reference frames exceeds max (probably "
+ "number of reference frames (%d+%d) exceeds max (%d; probably "
"corrupt input), discarding one\n");
diff --git a/contrib/ffmpeg/A02-audioconvert.patch b/contrib/ffmpeg/A02-audioconvert.patch
index 8bbb657d9..10e4cf1b5 100644
--- a/contrib/ffmpeg/A02-audioconvert.patch
+++ b/contrib/ffmpeg/A02-audioconvert.patch
@@ -6,8 +6,8 @@ Index: libavcodec/Makefile
NAME = avcodec
FFLIBS = avutil
--HEADERS = avcodec.h avfft.h dxva2.h opt.h vaapi.h vdpau.h xvmc.h
-+HEADERS = avcodec.h avfft.h dxva2.h opt.h vaapi.h vdpau.h xvmc.h audioconvert.h
+-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/P03-mingw-gnu99.patch b/contrib/ffmpeg/P03-mingw-gnu99.patch
deleted file mode 100644
index 06a598dd0..000000000
--- a/contrib/ffmpeg/P03-mingw-gnu99.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Index: configure
-===================================================================
---- ffmpeg.orig/configure (revision 25082)
-+++ ffmpeg/configure (working copy)
-@@ -2222,7 +2222,7 @@
- fi
-
- add_cppflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
--check_cflags -std=c99
-+check_cflags -std=gnu99
- check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
- #include <stdlib.h>
- EOF
-@@ -2230,7 +2230,7 @@
- #include <stdlib.h>
- EOF
-
--check_host_cflags -std=c99
-+check_host_cflags -std=gnu99
-
- case "$arch" in
- alpha|ia64|mips|parisc|sparc)
diff --git a/contrib/ffmpeg/P04-darwin-memalign.patch b/contrib/ffmpeg/P04-darwin-memalign.patch
new file mode 100644
index 000000000..7c669b35b
--- /dev/null
+++ b/contrib/ffmpeg/P04-darwin-memalign.patch
@@ -0,0 +1,16 @@
+diff --git a/libavutil/mem.c b/libavutil/mem.c
+index 27bb30b..6f29363 100644
+--- a/libavutil/mem.c
++++ b/libavutil/mem.c
+@@ -80,6 +80,11 @@ void *av_malloc(size_t size)
+ ptr = (char*)ptr + diff;
+ ((char*)ptr)[-1]= diff;
+ #elif HAVE_POSIX_MEMALIGN
++#if defined(__APPLE__)
++ if (size == 0)
++ ptr = NULL;
++ else
++#endif
+ if (posix_memalign(&ptr,32,size))
+ ptr = NULL;
+ #elif HAVE_MEMALIGN
diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs
index b524e27a7..243b314ef 100644
--- a/contrib/ffmpeg/module.defs
+++ b/contrib/ffmpeg/module.defs
@@ -1,7 +1,7 @@
$(eval $(call import.MODULE.defs,FFMPEG,ffmpeg,BZIP2 ZLIB))
$(eval $(call import.CONTRIB.defs,FFMPEG))
-FFMPEG.FETCH.url = http://download.handbrake.fr/handbrake/contrib/ffmpeg-git-0b32da9.tar.bz2
+FFMPEG.FETCH.url = http://download.handbrake.fr/handbrake/contrib/ffmpeg-git-v0.7b2-406-g7b20d35.tar.bz2
FFMPEG.CONFIGURE.deps =
FFMPEG.CONFIGURE.env =
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index 3279feef4..f41ad239d 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -1077,7 +1077,12 @@ static int setup_extradata( hb_work_object_t *w, hb_buffer_t *in )
// we haven't been inflicted with M$ - allocate a little space as
// a marker and return success.
pv->context->extradata_size = 0;
- pv->context->extradata = av_malloc(pv->context->extradata_size);
+ // av_malloc uses posix_memalign which is allowed to
+ // return NULL when allocating 0 bytes. We use extradata == NULL
+ // to trigger initialization of extradata and the decoder, so
+ // we can not set it to NULL here. So allocate a small
+ // buffer instead.
+ pv->context->extradata = av_malloc(1);
return 0;
}
diff --git a/libhb/hb.c b/libhb/hb.c
index c877ae91e..a4761a867 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -257,6 +257,7 @@ void hb_ff_set_sample_fmt(AVCodecContext *context, AVCodec *codec)
{
if ( *fmt == AV_SAMPLE_FMT_FLT )
{
+ context->request_sample_fmt = AV_SAMPLE_FMT_FLT;
context->sample_fmt = AV_SAMPLE_FMT_FLT;
break;
}