Mercurial > libavformat.hg
diff utils.c @ 1379:4146500158b5 libavformat
Rename ABS macro to FFABS.
| author | diego |
|---|---|
| date | Wed, 11 Oct 2006 23:17:58 +0000 |
| parents | 0899bfe4105c |
| children | 3e12e3ca0ce3 |
line wrap: on
line diff
--- a/utils.c Wed Oct 11 16:57:00 2006 +0000 +++ b/utils.c Wed Oct 11 23:17:58 2006 +0000 @@ -711,8 +711,8 @@ by knowing the futur */ } else if(pkt->pts != AV_NOPTS_VALUE || pkt->dts != AV_NOPTS_VALUE || pkt->duration){ if(pkt->pts != AV_NOPTS_VALUE && pkt->duration){ - int64_t old_diff= ABS(st->cur_dts - pkt->duration - pkt->pts); - int64_t new_diff= ABS(st->cur_dts - pkt->pts); + int64_t old_diff= FFABS(st->cur_dts - pkt->duration - pkt->pts); + int64_t new_diff= FFABS(st->cur_dts - pkt->pts); if(old_diff < new_diff && old_diff < (pkt->duration>>3)){ pkt->pts += pkt->duration; // av_log(NULL, AV_LOG_DEBUG, "id:%d old:%Ld new:%Ld dur:%d cur:%Ld size:%d\n", pkt->stream_index, old_diff, new_diff, pkt->duration, st->cur_dts, pkt->size); @@ -1947,7 +1947,7 @@ best_error= INT64_MAX; for(j=1; j<60*12; j++){ - error= ABS(1001*12*num - 1001*j*den); + error= FFABS(1001*12*num - 1001*j*den); if(error < best_error){ best_error= error; av_reduce(&st->r_frame_rate.num, &st->r_frame_rate.den, j, 12, INT_MAX); @@ -1955,7 +1955,7 @@ } for(j=0; j<3; j++){ static const int ticks[]= {24,30,60}; - error= ABS(1001*12*num - 1000*12*den * ticks[j]); + error= FFABS(1001*12*num - 1000*12*den * ticks[j]); if(error < best_error){ best_error= error; av_reduce(&st->r_frame_rate.num, &st->r_frame_rate.den, ticks[j]*1000, 1001, INT_MAX);
