diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-13 00:02:18 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-13 00:02:27 +0100 |
commit | 8f8c31f4c717e815a63b54cfe6445eb9d5ff7b95 (patch) | |
tree | e174a120011763b247424f6db951f5cb3d4e29fb | |
parent | b0112019f918b24b085395be243be91a196e73af (diff) | |
parent | 913aa9a4874418724183a3ec862cdc63b829367d (diff) | |
download | ffmpeg-8f8c31f4c717e815a63b54cfe6445eb9d5ff7b95.tar.gz |
Merge commit '913aa9a4874418724183a3ec862cdc63b829367d'
* commit '913aa9a4874418724183a3ec862cdc63b829367d':
libx264: Return more meaningful error codes
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-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 0685b300a0..aba02821aa 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -268,11 +268,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; @@ -687,7 +687,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) |