Merge commit '6f7a32839d1b913be8170e91c3ac9816b314da21'

* commit '6f7a32839d1b913be8170e91c3ac9816b314da21':
  svq1enc: correctly handle memory error and allocations

Conflicts:
	libavcodec/svq1enc.c

See: 79888388e7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-02-03 22:39:41 +01:00
commit acfb4ede2f

View File

@ -595,9 +595,9 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
}
if (!s->last_picture->data[0]) {
if ((ret = ff_get_buffer(avctx, s->last_picture, 0)) < 0) {
ret = ff_get_buffer(avctx, s->last_picture, 0);
if (ret < 0)
return ret;
}
}
if (!s->scratchbuf) {
s->scratchbuf = av_malloc_array(s->current_picture->linesize[0], 16 * 3);