summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-06-07 22:35:54 +0000
committerjstebbins <[email protected]>2011-06-07 22:35:54 +0000
commit1e92c150aac42a8cd6e8c12b10494d9a1f42796e (patch)
tree177523c63a4023a4393805358624af72e4e91bbb
parentd40287132815adc74a0d1444a1e7b76e89879f69 (diff)
fix up usage of deprecated libav symbols and clean up patch fuzz
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4030 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--contrib/ffmpeg/A01-mpegleak.patch63
-rw-r--r--contrib/ffmpeg/A02-audioconvert.patch10
-rw-r--r--contrib/ffmpeg/A03-png-sequences.patch12
-rw-r--r--contrib/ffmpeg/P01-solaris.patch12
-rw-r--r--contrib/ffmpeg/P02-darwin-pic.patch16
-rw-r--r--libhb/decavcodec.c2
-rw-r--r--libhb/encavcodec.c14
-rw-r--r--libhb/encavcodecaudio.c6
8 files changed, 67 insertions, 68 deletions
diff --git a/contrib/ffmpeg/A01-mpegleak.patch b/contrib/ffmpeg/A01-mpegleak.patch
index 44a99274e..1ca462c6d 100644
--- a/contrib/ffmpeg/A01-mpegleak.patch
+++ b/contrib/ffmpeg/A01-mpegleak.patch
@@ -1,8 +1,34 @@
-Index: libavcodec/mpegvideo.c
-===================================================================
---- ffmpeg.orig/libavcodec/mpegvideo.c (revision 22823)
-+++ ffmpeg/libavcodec/mpegvideo.c (working copy)
-@@ -867,19 +867,18 @@
+diff --git a/libavcodec/h264.c b/libavcodec/h264.c
+index 0aa923f..15bf61d 100644
+--- a/libavcodec/h264.c
++++ b/libavcodec/h264.c
+@@ -3644,7 +3644,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 a025f7d..eda5e41 100644
+--- a/libavcodec/h264_refs.c
++++ b/libavcodec/h264_refs.c
+@@ -628,7 +628,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 6a45da8..dc25c4d 100644
+--- a/libavcodec/mpegvideo.c
++++ b/libavcodec/mpegvideo.c
+@@ -986,19 +986,18 @@ int ff_find_unused_picture(MpegEncContext *s, int shared){
}
av_log(s->avctx, AV_LOG_FATAL, "Internal error, picture buffer overflow\n");
@@ -34,30 +60,3 @@ Index: libavcodec/mpegvideo.c
}
static void update_noise_reduction(MpegEncContext *s){
-Index: libavcodec/h264.c
-===================================================================
---- ffmpeg.orig/libavcodec/h264.c (revision 22823)
-+++ ffmpeg/libavcodec/h264.c (working copy)
-@@ -2772,8 +2772,8 @@
-
- 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;
- }
-
-Index: libavcodec/h264_refs.c
-===================================================================
---- ffmpeg.orig/libavcodec/h264_refs.c (revision 22823)
-+++ ffmpeg/libavcodec/h264_refs.c (working copy)
-@@ -608,7 +608,7 @@
- * 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");
-
diff --git a/contrib/ffmpeg/A02-audioconvert.patch b/contrib/ffmpeg/A02-audioconvert.patch
index 10e4cf1b5..befe00fab 100644
--- a/contrib/ffmpeg/A02-audioconvert.patch
+++ b/contrib/ffmpeg/A02-audioconvert.patch
@@ -1,8 +1,8 @@
-Index: libavcodec/Makefile
-===================================================================
---- ffmpeg.orig/libavcodec/Makefile (revision 22823)
-+++ ffmpeg/libavcodec/Makefile (working copy)
-@@ -3,7 +3,7 @@
+diff --git a/libavcodec/Makefile b/libavcodec/Makefile
+index b772bf1..17c4649 100644
+--- a/libavcodec/Makefile
++++ b/libavcodec/Makefile
+@@ -3,7 +3,7 @@ include $(SUBDIR)../config.mak
NAME = avcodec
FFLIBS = avutil
diff --git a/contrib/ffmpeg/A03-png-sequences.patch b/contrib/ffmpeg/A03-png-sequences.patch
index 6f244170b..5be83fbb4 100644
--- a/contrib/ffmpeg/A03-png-sequences.patch
+++ b/contrib/ffmpeg/A03-png-sequences.patch
@@ -1,8 +1,8 @@
-Index: libavcodec/pngdec.c
-===================================================================
---- ffmpeg.orig/libavcodec/pngdec.c (revision 22823)
-+++ ffmpeg/libavcodec/pngdec.c (working copy)
-@@ -597,6 +597,18 @@
+diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
+index 7477f67..9e8e29b 100644
+--- a/libavcodec/pngdec.c
++++ b/libavcodec/pngdec.c
+@@ -599,6 +599,18 @@ static int decode_frame(AVCodecContext *avctx,
}
}
exit_loop:
@@ -21,7 +21,7 @@ Index: libavcodec/pngdec.c
/* handle p-frames only if a predecessor frame is available */
if(s->last_picture->data[0] != NULL) {
if(!(avpkt->flags & AV_PKT_FLAG_KEY)) {
-@@ -613,6 +625,7 @@
+@@ -615,6 +627,7 @@ static int decode_frame(AVCodecContext *avctx,
}
}
}
diff --git a/contrib/ffmpeg/P01-solaris.patch b/contrib/ffmpeg/P01-solaris.patch
index 4eadaa6c8..364e07adf 100644
--- a/contrib/ffmpeg/P01-solaris.patch
+++ b/contrib/ffmpeg/P01-solaris.patch
@@ -1,8 +1,8 @@
-Index: configure
-===================================================================
---- ffmpeg.orig/configure (revision 22823)
-+++ ffmpeg/configure (working copy)
-@@ -54,6 +54,9 @@
+diff --git a/configure b/configure
+index 2a1883b..ab0c8b3 100755
+--- a/configure
++++ b/configure
+@@ -54,6 +54,9 @@ if test "$E1" != 0 || test "$E2" = 0; then
exit 1
fi
@@ -12,7 +12,7 @@ Index: configure
show_help(){
cat <<EOF
Usage: configure [options]
-@@ -2387,7 +2390,7 @@
+@@ -2595,7 +2598,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 c151b2950..5df981507 100644
--- a/contrib/ffmpeg/P02-darwin-pic.patch
+++ b/contrib/ffmpeg/P02-darwin-pic.patch
@@ -1,8 +1,8 @@
-Index: configure
-===================================================================
---- ffmpeg.orig/configure (revision 22823)
-+++ ffmpeg/configure (working copy)
-@@ -2191,6 +2191,7 @@
+diff --git a/configure b/configure
+index 2a1883b..4b4242a 100755
+--- a/configure
++++ b/configure
+@@ -2410,6 +2410,7 @@ case $target_os in
FFSERVERLDFLAGS=-Wl,-bind_at_load
objformat="macho"
enabled x86_64 && objformat="macho64"
@@ -10,9 +10,9 @@ Index: configure
enabled_any pic shared ||
{ check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
;;
-@@ -2291,7 +2292,7 @@
- ;;
- esac
+@@ -2521,7 +2522,7 @@ esac
+
+ echo "config:$arch:$subarch:$cpu:$target_os:$cc_ident:$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/libhb/decavcodec.c b/libhb/decavcodec.c
index f41ad239d..fd7d24f14 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -1583,7 +1583,7 @@ static void decodeAudio( hb_audio_t * audio, hb_work_private_t *pv, uint8_t *dat
int isamp;
AVAudioConvert *ctx;
- isamp = av_get_bits_per_sample_fmt( context->sample_fmt ) / 8;
+ isamp = av_get_bytes_per_sample( context->sample_fmt );
ctx = av_audio_convert_alloc( AV_SAMPLE_FMT_FLT, 1,
context->sample_fmt, 1,
NULL, 0 );
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c
index 0a7d7f62b..da46db8c5 100644
--- a/libhb/encavcodec.c
+++ b/libhb/encavcodec.c
@@ -489,29 +489,29 @@ int encavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
buf->flags &= ~HB_FRAME_REF;
switch ( pv->context->coded_frame->pict_type )
{
- case FF_P_TYPE:
+ case AV_PICTURE_TYPE_P:
{
buf->frametype = HB_FRAME_P;
} break;
- case FF_B_TYPE:
+ case AV_PICTURE_TYPE_B:
{
buf->frametype = HB_FRAME_B;
} break;
- case FF_S_TYPE:
+ case AV_PICTURE_TYPE_S:
{
buf->frametype = HB_FRAME_P;
} break;
- case FF_SP_TYPE:
+ case AV_PICTURE_TYPE_SP:
{
buf->frametype = HB_FRAME_P;
} break;
- case FF_BI_TYPE:
- case FF_SI_TYPE:
- case FF_I_TYPE:
+ case AV_PICTURE_TYPE_BI:
+ case AV_PICTURE_TYPE_SI:
+ case AV_PICTURE_TYPE_I:
{
buf->flags |= HB_FRAME_REF;
if ( pv->context->coded_frame->key_frame )
diff --git a/libhb/encavcodecaudio.c b/libhb/encavcodecaudio.c
index a295dc368..3258ca042 100644
--- a/libhb/encavcodecaudio.c
+++ b/libhb/encavcodecaudio.c
@@ -105,7 +105,7 @@ static int encavcodecaInit( hb_work_object_t * w, hb_job_t * job )
// Set a reasonable maximum output size
pv->output_bytes = context->frame_size *
- (av_get_bits_per_sample_fmt(context->sample_fmt) / 8) *
+ av_get_bytes_per_sample(context->sample_fmt) *
context->channels;
pv->buf = malloc( pv->input_samples * sizeof( float ) );
@@ -206,8 +206,8 @@ static hb_buffer_t * Encode( hb_work_object_t * w )
int isamp, osamp;
AVAudioConvert *ctx;
- isamp = av_get_bits_per_sample_fmt( AV_SAMPLE_FMT_FLT ) / 8;
- osamp = av_get_bits_per_sample_fmt( pv->context->sample_fmt ) / 8;
+ isamp = av_get_bytes_per_sample( AV_SAMPLE_FMT_FLT );
+ osamp = av_get_bytes_per_sample( pv->context->sample_fmt );
ctx = av_audio_convert_alloc( pv->context->sample_fmt, 1,
AV_SAMPLE_FMT_FLT, 1,
NULL, 0 );