Revision 4f9ce3c4 libavfilter/avfilter.c

View differences:

libavfilter/avfilter.c
48 48
AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
49 49
{
50 50
    AVFilterBufferRef *ret = av_malloc(sizeof(AVFilterBufferRef));
51
    if (!ret)
52
        return NULL;
51 53
    *ret = *ref;
52 54
    if (ref->type == AVMEDIA_TYPE_VIDEO) {
53 55
        ret->video = av_malloc(sizeof(AVFilterBufferRefVideoProps));
56
        if (!ret->video) {
57
            av_free(ret);
58
            return NULL;
59
        }
54 60
        *ret->video = *ref->video;
55 61
    }
56 62
    ret->perms &= pmask;

Also available in: Unified diff