Revision 6d34323e libavcodec/imgconvert.c

View differences:

libavcodec/imgconvert.c
813 813
int avpicture_alloc(AVPicture *picture,
814 814
                    enum PixelFormat pix_fmt, int width, int height)
815 815
{
816
    if (av_image_alloc(picture->data, picture->linesize, width, height, pix_fmt, 0) < 0) {
816
    int ret;
817

  
818
    if ((ret = av_image_alloc(picture->data, picture->linesize, width, height, pix_fmt, 0)) < 0) {
817 819
        memset(picture, 0, sizeof(AVPicture));
818
        return -1;
820
        return ret;
819 821
    }
820 822

  
821 823
    return 0;

Also available in: Unified diff