aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-12-08 10:24:09 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-12-08 10:24:09 +0000
commit6d34323ee65f63084309ba05b09c8c2a0fca9924 (patch)
treec56ceeba7602a2d67a4ce26f0fd2e63a416ef680 /libavcodec
parent0141163d6aa9d041ed02a15f16a9e95e4e16654a (diff)
downloadffmpeg-6d34323ee65f63084309ba05b09c8c2a0fca9924.tar.gz
Make avpicture_alloc() return meaningful values.
Originally committed as revision 25922 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/imgconvert.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 165ba9ed8f..3c143613fd 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -813,9 +813,11 @@ void ff_shrink88(uint8_t *dst, int dst_wrap,
int avpicture_alloc(AVPicture *picture,
enum PixelFormat pix_fmt, int width, int height)
{
- if (av_image_alloc(picture->data, picture->linesize, width, height, pix_fmt, 0) < 0) {
+ int ret;
+
+ if ((ret = av_image_alloc(picture->data, picture->linesize, width, height, pix_fmt, 0)) < 0) {
memset(picture, 0, sizeof(AVPicture));
- return -1;
+ return ret;
}
return 0;