avcodec/sgienc: return meaningful error code

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2015-02-09 14:05:13 +00:00
parent 5763f67502
commit 238247b622

View File

@ -153,7 +153,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
/* Make an intermediate consecutive buffer. */
if (!(encode_buf = av_malloc(width)))
return -1;
return AVERROR(ENOMEM);
for (z = 0; z < depth; z++) {
in_buf = p->data[0] + p->linesize[0] * (height - 1) + z;