[FFmpeg-devel] [PATCH 2/3] libx265: Return proper invalid data code

Derek Buitenhuis derek.buitenhuis at gmail.com
Tue Feb 17 23:02:30 CET 2015


Signed-off-by: Derek Buitenhuis <derek.buitenhuis at 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;
     }
 
     ctx->params->frameNumThreads = avctx->thread_count;
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list