diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-02 01:08:01 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-02 01:08:01 +0400 |
commit | e881a9663216bbce4e105cbe2569ef1cc50bb10b (patch) | |
tree | 88c27fa5c837eb4d584631389d7e4517f4ce4953 /libavcodec/libxvid.c | |
parent | 2ff81d09160626d0c7919a0db73a9428abe2cef1 (diff) |
avcodec/libxvid: improve return codes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libxvid.c')
-rw-r--r-- | libavcodec/libxvid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c index c76a5cda2f..88d748e8b8 100644 --- a/libavcodec/libxvid.c +++ b/libavcodec/libxvid.c @@ -695,7 +695,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, /* Initialize input image fields */ if( avctx->pix_fmt != AV_PIX_FMT_YUV420P ) { av_log(avctx, AV_LOG_ERROR, "Xvid: Color spaces other than 420p not supported\n"); - return -1; + return AVERROR(EINVAL); } xvid_enc_frame.input.csp = XVID_CSP_PLANAR; /* YUV420P */ @@ -782,7 +782,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, if (!xerr) return 0; av_log(avctx, AV_LOG_ERROR, "Xvid: Encoding Error Occurred: %i\n", xerr); - return -1; + return AVERROR_EXTERNAL; } } |