aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-10-13 08:12:50 +0000
committerPaul B Mahol <onemda@gmail.com>2012-10-13 16:03:03 +0000
commit93931143feb05f745a960dcc9e2e69e50de3e890 (patch)
tree53191d31ed152c718d4dc0972cd846aeb1b02790 /libavcodec
parentf58f90238fc63090da34c9fdb1d06d724d929f6d (diff)
downloadffmpeg-93931143feb05f745a960dcc9e2e69e50de3e890.tar.gz
lavc: return s->get_buffer() error code if it errors out
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 183776a09c..ae748b5f37 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -621,7 +621,7 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic)
int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic)
{
AVFrame temp_pic;
- int i;
+ int i, ret;
av_assert0(s->codec_type == AVMEDIA_TYPE_VIDEO);
@@ -655,8 +655,8 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic)
pic->data[i] = pic->base[i] = NULL;
pic->opaque = NULL;
/* Allocate new frame */
- if (s->get_buffer(s, pic))
- return -1;
+ if ((ret = s->get_buffer(s, pic)))
+ return ret;
/* Copy image data from old buffer to new buffer */
av_picture_copy((AVPicture *)pic, (AVPicture *)&temp_pic, s->pix_fmt, s->width,
s->height);