Revision c17a53b7 libavcodec/flashsvenc.c

View differences:

libavcodec/flashsvenc.c
218 218

  
219 219
    /* First frame needs to be a keyframe */
220 220
    if (avctx->frame_number == 0) {
221
        s->previous_frame = av_mallocz(abs(p->linesize[0])*s->image_height);
221
        s->previous_frame = av_mallocz(FFABS(p->linesize[0])*s->image_height);
222 222
        if (!s->previous_frame) {
223 223
            av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
224 224
            return -1;
......
253 253
    if(p->linesize[0] > 0)
254 254
        memcpy(s->previous_frame, p->data[0], s->image_height*p->linesize[0]);
255 255
    else
256
        memcpy(s->previous_frame, p->data[0] + p->linesize[0] * (s->image_height-1), s->image_height*abs(p->linesize[0]));
256
        memcpy(s->previous_frame, p->data[0] + p->linesize[0] * (s->image_height-1), s->image_height*FFABS(p->linesize[0]));
257 257

  
258 258
    //mark the frame type so the muxer can mux it correctly
259 259
    if (I_frame) {

Also available in: Unified diff