diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-01 22:08:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-01 22:08:44 +0200 |
commit | 58677d73ed43020ea0840e633588e344396ee256 (patch) | |
tree | ee96724ecd357d71717e99263c4104ad380b79bc | |
parent | acc3c380cb010451e8e336b622e7ae446709d5c2 (diff) | |
parent | 6248694861f0c414571fadba447a0c1cab95284e (diff) | |
download | ffmpeg-58677d73ed43020ea0840e633588e344396ee256.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
avconv: fix some bugs introduced in 630902a1e1336e7ee0cf3dcbcb6eb07af8edf660
libmp3lame: fix typo
AVOptions: drop av_ prefix from static av_get_number().
libx264: use X264_THREADS_AUTO constant instead of 0.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | avconv.c | 6 | ||||
-rw-r--r-- | libavcodec/libmp3lame.c | 2 | ||||
-rw-r--r-- | libavcodec/libx264.c | 2 | ||||
-rw-r--r-- | libavutil/opt.c | 8 |
4 files changed, 9 insertions, 9 deletions
@@ -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; } |