summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1953fc9)
We now inspect the new profile member of AVCodecContext to determine if
the stream is DTS or DTS-HD and send it to the appropriate decoder.
git-svn-id: svn://localhost/HandBrake/trunk@3785
b64f7644-9d1e-0410-96f1-
a4d463321fa5
-static const char* make_upper( const char* s )
-{
- static char name[8];
- char *cp = name;
- char *ep = cp + sizeof(name)-1;
-
- while ( *s && cp < ep )
- {
- *cp++ = islower(*s)? toupper(*s) : *s;
- ++s;
- }
- *cp = 0;
- return name;
-}
-
static void set_audio_description( hb_audio_t *audio, iso639_lang_t *lang )
{
/* XXX
static void set_audio_description( hb_audio_t *audio, iso639_lang_t *lang )
{
/* XXX
( cc = hb_ffmpeg_context( audio->config.in.codec_param ) ) &&
avcodec_find_decoder( cc->codec_id ) )
{
( cc = hb_ffmpeg_context( audio->config.in.codec_param ) ) &&
avcodec_find_decoder( cc->codec_id ) )
{
- codec_name = make_upper( avcodec_find_decoder( cc->codec_id )->name );
+ AVCodec *codec = avcodec_find_decoder( cc->codec_id );
+ codec_name = codec->name;
if ( !strcmp( codec_name, "LIBFAAD" ) )
{
codec_name = "AAC";
}
if ( !strcmp( codec_name, "LIBFAAD" ) )
{
codec_name = "AAC";
}
+ if ( !strcmp( codec_name, "DCA" ) )
+ {
+ codec_name = "DTS";
+ }
+
+ char *profile_name;
+ profile_name = av_get_profile_name( codec, cc->profile );
+ if ( profile_name )
+ {
+ codec_name = profile_name;
+ }
}
else if ( audio->config.in.codec == HB_ACODEC_MPGA &&
avcodec_find_decoder( audio->config.in.codec_param ) )
}
else if ( audio->config.in.codec == HB_ACODEC_MPGA &&
avcodec_find_decoder( audio->config.in.codec_param ) )
{
audio->config.in.codec = HB_ACODEC_AC3;
}
{
audio->config.in.codec = HB_ACODEC_AC3;
}
- else if ( codec->codec_id == CODEC_ID_DTS )
+ else if ( codec->codec_id == CODEC_ID_DTS &&
+ ( codec->profile == FF_PROFILE_DTS ||
+ codec->profile == FF_PROFILE_DTS_ES ||
+ codec->profile == FF_PROFILE_DTS_96_24 ) )
{
audio->config.in.codec = HB_ACODEC_DCA;
}
{
audio->config.in.codec = HB_ACODEC_DCA;
}