summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-11-10 16:51:35 +0000
committerjstebbins <[email protected]>2010-11-10 16:51:35 +0000
commit98d004a546fd76f8e57e132a3faafa04135e5e3f (patch)
tree7ba0f5bdb576cb058461e22d2433d5cfcac8e73f /libhb
parentb1e9e6da2cc081b800dd19433e2bbed54c96e0bc (diff)
bump ffmpeg from r25374 to r25689
brings back LATM support git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3669 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/decavcodec.c2
-rw-r--r--libhb/stream.c19
2 files changed, 13 insertions, 8 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index c40ce49ec..2ccac589a 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -1386,7 +1386,7 @@ static void decodeAudio( hb_audio_t * audio, hb_work_private_t *pv, uint8_t *dat
// anything more complicated than a one-for-one format
// conversion we'd probably want to cache the converter
// context in the pv.
- int isamp = av_get_bits_per_sample_format( context->sample_fmt ) / 8;
+ int isamp = av_get_bits_per_sample_fmt( context->sample_fmt ) / 8;
AVAudioConvert *ctx = av_audio_convert_alloc( SAMPLE_FMT_S16, 1,
context->sample_fmt, 1,
NULL, 0 );
diff --git a/libhb/stream.c b/libhb/stream.c
index 204baa7b0..32d407735 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -58,11 +58,7 @@ static const stream2codec_t st2codec[256] = {
st(0x0e, N, 0, 0, "ISO 13818-1 auxiliary"),
st(0x0f, A, HB_ACODEC_MPGA, CODEC_ID_AAC, "ISO 13818-7 AAC Audio"),
st(0x10, V, WORK_DECAVCODECV, CODEC_ID_MPEG4, "MPEG4"),
-#if defined(OLD_LATM_PATCH)
st(0x11, A, HB_ACODEC_MPGA, CODEC_ID_AAC_LATM, "MPEG4 LATM AAC"),
-#else
- st(0x11, N, 0, 0, "MPEG4 LATM AAC"),
-#endif
st(0x12, U, 0, 0, "MPEG4 generic"),
st(0x14, N, 0, 0, "ISO 13818-6 DSM-CC download"),
@@ -2997,6 +2993,7 @@ 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;
+ AVMetadataTag *tag;
int layout;
// scan will ignore any audio without a bitrate. Since we've already
@@ -3031,7 +3028,9 @@ static void add_ffmpeg_audio( hb_title_t *title, hb_stream_t *stream, int id )
audio->config.in.channel_layout = layout;
}
- set_audio_description( audio, lang_for_code2( st->language ) );
+ tag = av_metadata_get( st->metadata, "language", NULL, 0 );
+ set_audio_description( audio,
+ lang_for_code2( tag ? tag->value : "und" ) );
hb_list_add( title->list_audio, audio );
}
@@ -3199,7 +3198,11 @@ static void add_ffmpeg_subtitle( hb_title_t *title, hb_stream_t *stream, int id
return;
}
- iso639_lang_t *language = lang_for_code2( st->language );
+ AVMetadataTag *tag;
+ iso639_lang_t *language;
+
+ tag = av_metadata_get( st->metadata, "language", NULL, 0 );
+ language = lang_for_code2( tag ? tag->value : "und" );
strcpy( subtitle->lang, language->eng_name );
strncpy( subtitle->iso639_2, language->iso639_2, 4 );
@@ -3330,6 +3333,7 @@ static hb_title_t *ffmpeg_title_scan( hb_stream_t *stream )
for( i = 0; i < ic->nb_chapters; i++ )
if( ( m = ic->chapters[i] ) != NULL )
{
+ AVMetadataTag *tag;
hb_chapter_t * chapter;
chapter = calloc( sizeof( hb_chapter_t ), 1 );
chapter->index = i+1;
@@ -3338,7 +3342,8 @@ static hb_title_t *ffmpeg_title_scan( hb_stream_t *stream )
chapter->hours = chapter->duration / 90000 / 3600;
chapter->minutes = ( ( chapter->duration / 90000 ) % 3600 ) / 60;
chapter->seconds = ( chapter->duration / 90000 ) % 60;
- strcpy( chapter->title, m->title );
+ tag = av_metadata_get( m->metadata, "title", NULL, 0 );
+ strcpy( chapter->title, tag ? tag->value : "" );
hb_deep_log( 2, "Added chapter %i, name='%s', dur=%"PRIu64", (%02i:%02i:%02i)",
chapter->index, chapter->title,
chapter->duration, chapter->hours,