mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
Make avpicture_alloc() return meaningful values.
Originally committed as revision 25922 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
0141163d6a
commit
6d34323ee6
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user