diff options
author | Rodeo <[email protected]> | 2012-06-27 13:30:26 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-06-27 13:30:26 +0000 |
commit | 61cdce11c3522ca680c14263b4bfff59f046b89b (patch) | |
tree | 6881fb2d3ab4856eea44e00eeab8dcaa6a5d49b0 | |
parent | 39866ea0d97700256a6c88aad0a4dcddc900a3b0 (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
-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 ); |