diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2015-03-12 21:50:13 +0530 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-03-12 19:09:22 +0100 |
commit | 913aa9a4874418724183a3ec862cdc63b829367d (patch) | |
tree | 3c15aedcac7d7dff50c30f5cde604d3a5904de21 | |
parent | 6bdae41d3ef74a0865e8f87896e649f93b2f39bd (diff) | |
download | ffmpeg-913aa9a4874418724183a3ec862cdc63b829367d.tar.gz |
libx264: Return more meaningful error codes
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r-- | libavcodec/libx264.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 6388b6ce6c..6e707a867a 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -235,11 +235,11 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, } do { if (x264_encoder_encode(x4->enc, &nal, &nnal, frame? &x4->pic: NULL, &pic_out) < 0) - return -1; + return AVERROR_UNKNOWN; ret = encode_nals(ctx, pkt, nal, nnal); if (ret < 0) - return -1; + return ret; } while (!ret && !frame && x264_encoder_delayed_frames(x4->enc)); pkt->pts = pic_out.i_pts; @@ -518,7 +518,7 @@ static av_cold int X264_init(AVCodecContext *avctx) x4->enc = x264_encoder_open(&x4->params); if (!x4->enc) - return -1; + return AVERROR_UNKNOWN; avctx->coded_frame = av_frame_alloc(); if (!avctx->coded_frame) |