summaryrefslogtreecommitdiffstats
path: root/libhb/common.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-01-04 13:33:38 +0000
committerRodeo <[email protected]>2013-01-04 13:33:38 +0000
commitccbdd4417db3b6f1262c9f12838e631ff97a3703 (patch)
tree74049f9d1df43aa8e83a8288a0f7da805ace6d19 /libhb/common.c
parent15b164a418a5f0b0da912a3acc980b861267e7da (diff)
libhb: add hb_get_default_audio_encoder().
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5144 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.c')
-rw-r--r--libhb/common.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/libhb/common.c b/libhb/common.c
index af47f9f89..29435b669 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -431,13 +431,7 @@ int hb_autopassthru_get_encoder( int in_codec, int copy_mask, int fallback, int
{
// fallback not possible with current muxer
// use the default audio encoder instead
-#ifndef __APPLE__
- if( muxer == HB_MUX_MKV )
- // Lame is the default for MKV
- fallback = HB_ACODEC_LAME;
- else
-#endif // Core Audio or faac
- fallback = hb_audio_encoders[0].encoder;
+ fallback = hb_get_default_audio_encoder(muxer);
break;
}
}
@@ -456,6 +450,17 @@ int hb_autopassthru_get_encoder( int in_codec, int copy_mask, int fallback, int
return out_codec;
}
+int hb_get_default_audio_encoder(int muxer)
+{
+#ifndef __APPLE__
+ if (muxer == HB_MUX_MKV)
+ {
+ return HB_ACODEC_LAME;
+ }
+#endif
+ return hb_audio_encoders[0].encoder;
+}
+
// Given an input bitrate, find closest match in the set of allowed bitrates
int hb_find_closest_audio_bitrate(int bitrate)
{