summaryrefslogtreecommitdiffstats
path: root/libhb/common.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-06-27 13:30:26 +0000
committerRodeo <[email protected]>2012-06-27 13:30:26 +0000
commit61cdce11c3522ca680c14263b4bfff59f046b89b (patch)
tree6881fb2d3ab4856eea44e00eeab8dcaa6a5d49b0 /libhb/common.c
parent39866ea0d97700256a6c88aad0a4dcddc900a3b0 (diff)
Fix hb_mixdown_get_discrete_channel_count for HB_AMIXDOWN_NONE (passthrough).
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4783 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.c')
-rw-r--r--libhb/common.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libhb/common.c b/libhb/common.c
index 6ec4ee308..7bc3e4088 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -99,9 +99,9 @@ int hb_get_video_encoders_count() { return hb_video_encoders_count; }
hb_encoder_t* hb_get_audio_encoders() { return hb_audio_encoders; }
int hb_get_audio_encoders_count() { return hb_audio_encoders_count; }
-int hb_mixdown_get_discrete_channel_count( int amixdown )
+int hb_mixdown_get_discrete_channel_count(int amixdown)
{
- switch( amixdown )
+ switch (amixdown)
{
case HB_AMIXDOWN_6CH:
return 6;
@@ -109,17 +109,20 @@ int hb_mixdown_get_discrete_channel_count( int amixdown )
case HB_AMIXDOWN_MONO:
return 1;
+ case HB_AMIXDOWN_NONE:
+ return 0;
+
default:
return 2;
}
}
-int hb_mixdown_get_mixdown_from_short_name( const char * short_name )
+int hb_mixdown_get_mixdown_from_short_name(const char *short_name)
{
int i;
for (i = 0; i < hb_audio_mixdowns_count; i++)
{
- if (strcmp(hb_audio_mixdowns[i].short_name, short_name) == 0)
+ if (!strcmp(hb_audio_mixdowns[i].short_name, short_name))
{
return hb_audio_mixdowns[i].amixdown;
}
@@ -127,7 +130,7 @@ int hb_mixdown_get_mixdown_from_short_name( const char * short_name )
return 0;
}
-const char * hb_mixdown_get_short_name_from_mixdown( int amixdown )
+const char* hb_mixdown_get_short_name_from_mixdown(int amixdown)
{
int i;
for (i = 0; i < hb_audio_mixdowns_count; i++)