diff options
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/common.c | 13 | ||||
-rw-r--r-- | libhb/common.h | 6 |
2 files changed, 11 insertions, 8 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++) diff --git a/libhb/common.h b/libhb/common.h index c55f49ad7..16c7acff8 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -197,9 +197,9 @@ int hb_get_video_encoders_count(); hb_encoder_t* hb_get_audio_encoders(); int hb_get_audio_encoders_count(); -int hb_mixdown_get_discrete_channel_count( int amixdown ); -int hb_mixdown_get_mixdown_from_short_name( const char * short_name ); -const char * hb_mixdown_get_short_name_from_mixdown( int amixdown ); +int hb_mixdown_get_discrete_channel_count(int amixdown); +int hb_mixdown_get_mixdown_from_short_name(const char *short_name); +const char* hb_mixdown_get_short_name_from_mixdown(int amixdown); void hb_autopassthru_apply_settings( hb_job_t * job, hb_title_t * title ); void hb_autopassthru_print_settings( hb_job_t * job ); |