Commit e881a966 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/libxvid: improve return codes

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2ff81d09
...@@ -695,7 +695,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -695,7 +695,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
/* Initialize input image fields */ /* Initialize input image fields */
if( avctx->pix_fmt != AV_PIX_FMT_YUV420P ) { if( avctx->pix_fmt != AV_PIX_FMT_YUV420P ) {
av_log(avctx, AV_LOG_ERROR, "Xvid: Color spaces other than 420p not supported\n"); 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 */ xvid_enc_frame.input.csp = XVID_CSP_PLANAR; /* YUV420P */
...@@ -782,7 +782,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -782,7 +782,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
if (!xerr) if (!xerr)
return 0; return 0;
av_log(avctx, AV_LOG_ERROR, "Xvid: Encoding Error Occurred: %i\n", xerr); av_log(avctx, AV_LOG_ERROR, "Xvid: Encoding Error Occurred: %i\n", xerr);
return -1; return AVERROR_EXTERNAL;
} }
} }
......
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