Revision 6950cca9

View differences:

libavcore/imgutils.c
66 66

  
67 67
    memset(linesizes, 0, 4*sizeof(linesizes[0]));
68 68

  
69
    if (desc->flags & PIX_FMT_HWACCEL)
69
    if ((unsigned)pix_fmt >= PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL)
70 70
        return AVERROR(EINVAL);
71 71

  
72 72
    if (desc->flags & PIX_FMT_BITSTREAM) {
......
93 93
    memset(size     , 0, sizeof(size));
94 94
    memset(has_plane, 0, sizeof(has_plane));
95 95

  
96
    if (desc->flags & PIX_FMT_HWACCEL)
96
    if ((unsigned)pix_fmt >= PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL)
97 97
        return AVERROR(EINVAL);
98 98

  
99 99
    data[0] = ptr;

Also available in: Unified diff