On 17/02/15 7:02 PM, Derek Buitenhuis wrote: > Signed-off-by: Derek Buitenhuis <derek.buitenh...@gmail.com> > --- > libavcodec/libx265.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c > index 9f40e95..c35f6c2 100644 > --- a/libavcodec/libx265.c > +++ b/libavcodec/libx265.c > @@ -99,7 +99,7 @@ static av_cold int libx265_encode_init(AVCodecContext > *avctx) > > if (x265_param_default_preset(ctx->params, ctx->preset, ctx->tune) < 0) { > av_log(avctx, AV_LOG_ERROR, "Invalid preset or tune.\n"); > - return AVERROR(EINVAL); > + return AVERROR_INVALIDDATA;
Afaik, if the error is based on user input then EINVAL (Invalid argument) is correct. AVERROR_INVALIDDATA is when the error is in the bitstream/container and not an argument the user passed to the library. > } > > ctx->params->frameNumThreads = avctx->thread_count; > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel