mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
Use FFABS instead of abs.
Originally committed as revision 9045 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
c8df9c6358
commit
c17a53b71f
@ -218,7 +218,7 @@ static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_siz
|
|||||||
|
|
||||||
/* First frame needs to be a keyframe */
|
/* First frame needs to be a keyframe */
|
||||||
if (avctx->frame_number == 0) {
|
if (avctx->frame_number == 0) {
|
||||||
s->previous_frame = av_mallocz(abs(p->linesize[0])*s->image_height);
|
s->previous_frame = av_mallocz(FFABS(p->linesize[0])*s->image_height);
|
||||||
if (!s->previous_frame) {
|
if (!s->previous_frame) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
|
av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
|
||||||
return -1;
|
return -1;
|
||||||
@ -253,7 +253,7 @@ static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_siz
|
|||||||
if(p->linesize[0] > 0)
|
if(p->linesize[0] > 0)
|
||||||
memcpy(s->previous_frame, p->data[0], s->image_height*p->linesize[0]);
|
memcpy(s->previous_frame, p->data[0], s->image_height*p->linesize[0]);
|
||||||
else
|
else
|
||||||
memcpy(s->previous_frame, p->data[0] + p->linesize[0] * (s->image_height-1), s->image_height*abs(p->linesize[0]));
|
memcpy(s->previous_frame, p->data[0] + p->linesize[0] * (s->image_height-1), s->image_height*FFABS(p->linesize[0]));
|
||||||
|
|
||||||
//mark the frame type so the muxer can mux it correctly
|
//mark the frame type so the muxer can mux it correctly
|
||||||
if (I_frame) {
|
if (I_frame) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user