diff options
author | jstebbins <[email protected]> | 2012-07-11 20:10:20 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2012-07-11 20:10:20 +0000 |
commit | 8b91bcb733913afea795cfea6178372eee5b4abe (patch) | |
tree | 09b4bd5693f2c361861d803522d2340b6beab985 /libhb/stream.c | |
parent | 7f1f338df87f6075e7edf0cd598523acaf0f82a1 (diff) |
bump libav to libav-v0.8-2197-g1a068bf
Resolves several deprecated api's
Eliminates several libav patches
Eliminates our builtin downmix in favour of avresample
Eliminate HB_INPUT_CH_LAYOUT_* and replace with AV_CH_LAYOUT_*
Resolves 6.x and 7.0 input channel layout issues HB had
Adds downmix support to declpcm. We never had it!
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4825 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/stream.c')
-rw-r--r-- | libhb/stream.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/libhb/stream.c b/libhb/stream.c index 3e4a682e3..4c9cb347c 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -5085,13 +5085,13 @@ static int ffmpeg_open( hb_stream_t *stream, hb_title_t *title, int scan ) return 1; fail: - if ( info_ic ) av_close_input_file( info_ic ); + if ( info_ic ) avformat_close_input( &info_ic ); return 0; } static void ffmpeg_close( hb_stream_t *d ) { - av_close_input_file( d->ffmpeg_ic ); + avformat_close_input( &d->ffmpeg_ic ); if ( d->ffmpeg_pkt != NULL ) { free( d->ffmpeg_pkt ); @@ -5104,23 +5104,9 @@ static void add_ffmpeg_audio( hb_title_t *title, hb_stream_t *stream, int id ) AVStream *st = stream->ffmpeg_ic->streams[id]; AVCodecContext *codec = st->codec; AVDictionaryEntry *tag; - int layout; - // DTS: work around lack of 6.0/6.1 support in libhb - if( hb_ff_dts_disable_xch( codec ) ) - { - hb_deep_log( 2, "add_ffmpeg_audio: found DTS-ES, requesting DTS core" ); - } - - // scan will ignore any audio without a bitrate. Since we've already - // typed the audio in order to determine its codec we set up the audio - // paramters here. - layout = hb_ff_layout_xlat( codec->channel_layout, codec->channels ); - if ( !layout ) - { - // Unsupported layout - return; - } + // scan will ignore any audio without a bitrate. Since we've already typed the + // audio in order to determine its codec we set up the audio parameters here. if ( codec->bit_rate || codec->sample_rate ) { hb_audio_t *audio = calloc( 1, sizeof(*audio) );; @@ -5173,8 +5159,9 @@ static void add_ffmpeg_audio( hb_title_t *title, hb_stream_t *stream, int id ) audio->config.in.bitrate = 1; audio->config.in.samplerate = codec->sample_rate; audio->config.in.samples_per_frame = codec->frame_size; - audio->config.in.channel_layout = layout; - audio->config.in.channel_map = &hb_smpte_chan_map; + audio->config.in.channel_map = &hb_libav_chan_map; + audio->config.in.channel_layout = hb_ff_layout_xlat(codec->channel_layout, + codec->channels); } tag = av_dict_get( st->metadata, "language", NULL, 0 ); |