diff options
author | Rodeo <[email protected]> | 2012-12-31 16:54:11 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-12-31 16:54:11 +0000 |
commit | 01d1b85d7adecdc588d5450ee43c52809c0b1c3f (patch) | |
tree | 4f08f2381a18b4e62c4e5a82d7b610c68e8f1432 /libhb/sync.c | |
parent | b96ca4f7de03e2c1b2d6865a0ae65798c1afed6f (diff) |
Bump libav to v9_beta3.
Miscellaneous bugfixes and improvements.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5124 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/sync.c')
-rw-r--r-- | libhb/sync.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/libhb/sync.c b/libhb/sync.c index 592ebb8c3..5ad5bfedb 100644 --- a/libhb/sync.c +++ b/libhb/sync.c @@ -950,15 +950,11 @@ static void InitAudio( hb_job_t * job, hb_sync_common_t * common, int i ) { case HB_ACODEC_AC3_PASS: { - codec = avcodec_find_encoder( CODEC_ID_AC3 ); + codec = avcodec_find_encoder( AV_CODEC_ID_AC3 ); } break; case HB_ACODEC_AAC_PASS: { - codec = avcodec_find_encoder( CODEC_ID_AAC ); - } break; - case HB_ACODEC_MP3_PASS: - { - codec = avcodec_find_encoder( CODEC_ID_MP3 ); + codec = avcodec_find_encoder( AV_CODEC_ID_AAC ); } break; default: { @@ -990,16 +986,13 @@ static void InitAudio( hb_job_t * job, hb_sync_common_t * common, int i ) } // Prepare input frame - AVFrame frame; - uint8_t * zeros; - - frame.nb_samples= c->frame_size; + AVFrame frame = { .nb_samples = c->frame_size, .pts = 0, }; int input_size = av_samples_get_buffer_size(NULL, c->channels, - frame.nb_samples, c->sample_fmt, 1); - zeros = calloc( 1, input_size ); - avcodec_fill_audio_frame(&frame, c->channels, - c->sample_fmt, zeros, input_size, 1); - frame.pts = 0; + frame.nb_samples, + c->sample_fmt, 1); + uint8_t *zeros = calloc(1, input_size); + avcodec_fill_audio_frame(&frame, c->channels, c->sample_fmt, zeros, + input_size, 1); // Allocate enough space for the encoded silence // The output should be < the input |