Commit 045ef52e authored by Erik Slagter's avatar Erik Slagter Committed by Michael Niedermayer

libx264.c: distinguish between x264 parameter errors.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d303e0af
...@@ -198,14 +198,19 @@ static void check_default_settings(AVCodecContext *avctx) ...@@ -198,14 +198,19 @@ static void check_default_settings(AVCodecContext *avctx)
} }
} }
#define OPT_STR(opt, param) \ #define OPT_STR(opt, param) \
do { \ do { \
if (param && x264_param_parse(&x4->params, opt, param) < 0) { \ int ret; \
av_log(avctx, AV_LOG_ERROR, \ if (param && (ret = x264_param_parse(&x4->params, opt, param)) < 0) { \
"bad value for '%s': '%s'\n", opt, param); \ if(ret == X264_PARAM_BAD_NAME) \
return -1; \ av_log(avctx, AV_LOG_ERROR, \
} \ "bad option '%s': '%s'\n", opt, param); \
} while (0); \ else \
av_log(avctx, AV_LOG_ERROR, \
"bad value for '%s': '%s'\n", opt, param); \
return -1; \
} \
} while (0);
static av_cold int X264_init(AVCodecContext *avctx) static av_cold int X264_init(AVCodecContext *avctx)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment