Mercurial > libavcodec.hg
comparison flashsvenc.c @ 5017:1eebbc25db1f libavcodec
Use FFABS instead of abs.
author | banan |
---|---|
date | Thu, 17 May 2007 11:03:43 +0000 |
parents | 3674582fb4e7 |
children | 48759bfbd073 |
comparison
equal
deleted
inserted
replaced
5016:3674582fb4e7 | 5017:1eebbc25db1f |
---|---|
216 | 216 |
217 *p = *pict; | 217 *p = *pict; |
218 | 218 |
219 /* First frame needs to be a keyframe */ | 219 /* First frame needs to be a keyframe */ |
220 if (avctx->frame_number == 0) { | 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 if (!s->previous_frame) { | 222 if (!s->previous_frame) { |
223 av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n"); | 223 av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n"); |
224 return -1; | 224 return -1; |
225 } | 225 } |
226 I_frame = 1; | 226 I_frame = 1; |
251 | 251 |
252 //save the current frame | 252 //save the current frame |
253 if(p->linesize[0] > 0) | 253 if(p->linesize[0] > 0) |
254 memcpy(s->previous_frame, p->data[0], s->image_height*p->linesize[0]); | 254 memcpy(s->previous_frame, p->data[0], s->image_height*p->linesize[0]); |
255 else | 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 //mark the frame type so the muxer can mux it correctly | 258 //mark the frame type so the muxer can mux it correctly |
259 if (I_frame) { | 259 if (I_frame) { |
260 p->pict_type = FF_I_TYPE; | 260 p->pict_type = FF_I_TYPE; |
261 p->key_frame = 1; | 261 p->key_frame = 1; |