summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--avconv.c6
-rw-r--r--libavcodec/libmp3lame.c2
-rw-r--r--libavcodec/libx264.c2
-rw-r--r--libavutil/opt.c8
4 files changed, 9 insertions, 9 deletions
diff --git a/avconv.c b/avconv.c
index 4e9f4af380..93346147b6 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1891,13 +1891,13 @@ static int init_input_stream(int ist_index, OutputStream *output_streams, int nb
if (ist->decoding_needed) {
AVCodec *codec = ist->dec;
if (!codec) {
- snprintf(error, sizeof(error), "Decoder (codec id %d) not found for input stream #%d.%d",
+ snprintf(error, error_len, "Decoder (codec id %d) not found for input stream #%d.%d",
ist->st->codec->codec_id, ist->file_index, ist->st->index);
return AVERROR(EINVAL);
}
if (avcodec_open2(ist->st->codec, codec, &ist->opts) < 0) {
- snprintf(error, sizeof(error), "Error while opening decoder for input stream #%d.%d",
+ snprintf(error, error_len, "Error while opening decoder for input stream #%d.%d",
ist->file_index, ist->st->index);
return AVERROR(EINVAL);
}
@@ -2203,7 +2203,7 @@ static int transcode_init(OutputFile *output_files,
/* init input streams */
for (i = 0; i < nb_input_streams; i++)
- if ((ret = init_input_stream(i, output_streams, nb_output_streams, error, sizeof(error)) < 0))
+ if ((ret = init_input_stream(i, output_streams, nb_output_streams, error, sizeof(error))) < 0)
goto dump_format;
/* open files and write file headers */
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index fae5131bb4..ec2155009b 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -72,7 +72,7 @@ static av_cold int MP3lame_encode_init(AVCodecContext *avctx)
lame_set_VBR_quality(s->gfp, avctx->global_quality/(float)FF_QP2LAMBDA);
}
lame_set_bWriteVbrTag(s->gfp,0);
-#if FF_API_LAME_GLOBAL_OPTIONS
+#if FF_API_LAME_GLOBAL_OPTS
s->reservoir = avctx->flags2 & CODEC_FLAG2_BIT_RESERVOIR;
#endif
lame_set_disable_reservoir(s->gfp, !s->reservoir);
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index ca65e9f1e2..d9a99f3d85 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -548,7 +548,7 @@ static const AVClass class = {
static const AVCodecDefault x264_defaults[] = {
{ "b", "0" },
- { "threads", "0" },
+ { "threads", AV_STRINGIFY(X264_THREADS_AUTO) },
{ NULL },
};
diff --git a/libavutil/opt.c b/libavutil/opt.c
index e56cdc65e7..43823690aa 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -260,7 +260,7 @@ const char *av_get_string(void *obj, const char *name, const AVOption **o_out, c
return buf;
}
-static int av_get_number(void *obj, const char *name, const AVOption **o_out, double *num, int *den, int64_t *intnum)
+static int get_number(void *obj, const char *name, const AVOption **o_out, double *num, int *den, int64_t *intnum)
{
const AVOption *o = av_opt_find(obj, name, NULL, 0, AV_OPT_SEARCH_CHILDREN);
void *dst;
@@ -293,7 +293,7 @@ double av_get_double(void *obj, const char *name, const AVOption **o_out)
double num=1;
int den=1;
- if (av_get_number(obj, name, o_out, &num, &den, &intnum) < 0)
+ if (get_number(obj, name, o_out, &num, &den, &intnum) < 0)
return NAN;
return num*intnum/den;
}
@@ -304,7 +304,7 @@ AVRational av_get_q(void *obj, const char *name, const AVOption **o_out)
double num=1;
int den=1;
- if (av_get_number(obj, name, o_out, &num, &den, &intnum) < 0)
+ if (get_number(obj, name, o_out, &num, &den, &intnum) < 0)
return (AVRational){0, 0};
if (num == 1.0 && (int)intnum == intnum)
return (AVRational){intnum, den};
@@ -318,7 +318,7 @@ int64_t av_get_int(void *obj, const char *name, const AVOption **o_out)
double num=1;
int den=1;
- if (av_get_number(obj, name, o_out, &num, &den, &intnum) < 0)
+ if (get_number(obj, name, o_out, &num, &den, &intnum) < 0)
return -1;
return num*intnum/den;
}