summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-01-04 15:02:07 +0000
committerRodeo <[email protected]>2013-01-04 15:02:07 +0000
commitbc5053fcb1eb98c81f8a0e1f3062379d90968ff5 (patch)
tree20df64ca714271934db2b91b29768b3aaa88340a
parent81321500fa1dfce2c59a424a390e6a0226bfbdbc (diff)
hb_rate_s, hb_mixdown_s, hb_encoder_s: use const char * instead of char *
These are used in hardcoded tables, so there will never be a need for mutable strings. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5148 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/common.c3
-rw-r--r--libhb/common.h20
-rw-r--r--test/test.c2
3 files changed, 13 insertions, 12 deletions
diff --git a/libhb/common.c b/libhb/common.c
index 978972269..21729cd4f 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -378,7 +378,8 @@ void hb_autopassthru_apply_settings( hb_job_t * job )
void hb_autopassthru_print_settings( hb_job_t * job )
{
int i, codec_len;
- char *mask = NULL, *tmp, *fallback = NULL;
+ char *mask = NULL, *tmp;
+ const char *fallback = NULL;
for( i = 0; i < hb_audio_encoders_count; i++ )
{
if( ( hb_audio_encoders[i].encoder & HB_ACODEC_PASS_FLAG ) &&
diff --git a/libhb/common.h b/libhb/common.h
index e9b5c29e3..32a23d5fd 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -170,24 +170,24 @@ void hb_chapter_set_title(hb_chapter_t *chapter, const char *title);
struct hb_rate_s
{
- char * string;
- int rate;
+ const char *string;
+ int rate;
};
struct hb_mixdown_s
{
- char * human_readable_name;
- char * internal_name;
- char * short_name;
- int amixdown;
+ const char *human_readable_name;
+ const char *internal_name;
+ const char *short_name;
+ int amixdown;
};
struct hb_encoder_s
{
- char * human_readable_name; // note: used in presets
- char * short_name; // note: used in CLI
- int encoder; // HB_*CODEC_* define
- int muxers; // supported muxers
+ const char *human_readable_name; // note: used in presets
+ const char *short_name; // note: used in CLI
+ int encoder; // HB_*CODEC_* define
+ int muxers; // supported muxers
};
struct hb_subtitle_config_s
diff --git a/test/test.c b/test/test.c
index 5ceb4045b..39d5ca467 100644
--- a/test/test.c
+++ b/test/test.c
@@ -3803,7 +3803,7 @@ static int ParseOptions( int argc, char ** argv )
{
for( j = 0; j < hb_audio_encoders_count; j++ )
{
- char * encoder = hb_audio_encoders[j].short_name;
+ const char *encoder = hb_audio_encoders[j].short_name;
// skip "copy:"
if( strlen( encoder ) > 5 )
encoder += 5;