Revision e259eadc

View differences:

libavcodec/targaenc.c
81 81

  
82 82
    if(avctx->width > 0xffff || avctx->height > 0xffff) {
83 83
        av_log(avctx, AV_LOG_ERROR, "image dimensions too large\n");
84
        return -1;
84
        return AVERROR(EINVAL);
85 85
    }
86 86
    picsize = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
87 87
    if(buf_size < picsize + 45) {
88 88
        av_log(avctx, AV_LOG_ERROR, "encoded frame too large\n");
89
        return -1;
89
        return AVERROR(EINVAL);
90 90
    }
91 91

  
92 92
    p->pict_type= FF_I_TYPE;
......
115 115
    default:
116 116
        av_log(avctx, AV_LOG_ERROR, "Pixel format '%s' not supported.\n",
117 117
               avcodec_get_pix_fmt_name(avctx->pix_fmt));
118
        return -1;
118
        return AVERROR(EINVAL);
119 119
    }
120 120
    bpp = outbuf[16] >> 3;
121 121

  

Also available in: Unified diff