aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorClément Bœsch <clement.boesch@smartjog.com>2011-09-12 12:02:41 +0200
committerClément Bœsch <ubitux@gmail.com>2011-09-12 12:09:08 +0200
commit525d4852b9d1c2feeab7b3eda742ac9b6d434f9c (patch)
treee321c23a5c6fd7cf8bb1ce08613ba44c21428beb /ffmpeg.c
parent4b961ddfea2aceb5bf9b2d595b59861c07cad5a7 (diff)
downloadffmpeg-525d4852b9d1c2feeab7b3eda742ac9b6d434f9c.tar.gz
ffmpeg: set {audio,video,subtitle}_codec_name const.
This fixes "assignment discards ‘const’ qualifier from pointer target type." warnings.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 05a07291b1..9901f0f324 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -113,7 +113,6 @@ static const OptionDef options[];
static int frame_bits_per_raw_sample = 0;
static int video_discard = 0;
-static char *video_codec_name = NULL;
static int same_quant = 0;
static int do_deinterlace = 0;
static int intra_dc_precision = 8;
@@ -121,8 +120,9 @@ static int loop_input = 0;
static int loop_output = AVFMT_NOOUTPUTLOOP;
static int qp_hist = 0;
static int intra_only = 0;
-static char *audio_codec_name = NULL;
-static char *subtitle_codec_name = NULL;
+static const char *video_codec_name = NULL;
+static const char *audio_codec_name = NULL;
+static const char *subtitle_codec_name = NULL;
static char *data_codec_name = NULL;
@@ -4119,9 +4119,9 @@ static int opt_preset(OptionsContext *o, const char *opt, const char *arg)
{
FILE *f=NULL;
char filename[1000], tmp[1000], tmp2[1000], line[1000];
- char *codec_name = *opt == 'v' ? video_codec_name :
- *opt == 'a' ? audio_codec_name :
- subtitle_codec_name;
+ const char *codec_name = *opt == 'v' ? video_codec_name :
+ *opt == 'a' ? audio_codec_name :
+ subtitle_codec_name;
if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
fprintf(stderr, "File for preset '%s' not found\n", arg);