summaryrefslogtreecommitdiffstats
path: root/libhb
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 /libhb
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
Diffstat (limited to 'libhb')
-rw-r--r--libhb/decavcodec.c2
-rw-r--r--libhb/encavcodec.c14
-rw-r--r--libhb/encavcodecaudio.c6
3 files changed, 11 insertions, 11 deletions
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 );