Revision 978805b2

View differences:

libavcodec/utils.c
66 66

  
67 67
    *size= FFMAX(17*min_size/16 + 32, min_size);
68 68

  
69
    return av_realloc(ptr, *size);
69
    ptr= av_realloc(ptr, *size);
70
    if(!ptr) //we could set this to the unmodified min_size but this is safer if the user lost the ptr and uses NULL now
71
        *size= 0;
72

  
73
    return ptr;
70 74
}
71 75

  
72 76
static unsigned int last_static = 0;

Also available in: Unified diff