summaryrefslogtreecommitdiff
path: root/libavcodec/xvidff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-04-30 21:43:59 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-04-30 21:43:59 +0000
commitc0df9d75bd9a3170a793eb1651354076360998e8 (patch)
tree0f4c75f07fc395d168bf0a7fcd92d6f9d9e9281b /libavcodec/xvidff.c
parentb7782b47c95c26d674df134973d1403e80fe9767 (diff)
switch to native time bases
Originally committed as revision 4168 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/xvidff.c')
-rw-r--r--libavcodec/xvidff.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/xvidff.c b/libavcodec/xvidff.c
index b46b5e3093..9156b2e47f 100644
--- a/libavcodec/xvidff.c
+++ b/libavcodec/xvidff.c
@@ -283,8 +283,8 @@ int ff_xvid_encode_init(AVCodecContext *avctx) {
/* Frame Rate and Key Frames */
xvid_correct_framerate(avctx);
- xvid_enc_create.fincr = avctx->frame_rate_base;
- xvid_enc_create.fbase = avctx->frame_rate;
+ xvid_enc_create.fincr = avctx->time_base.num;
+ xvid_enc_create.fbase = avctx->time_base.den;
if( avctx->gop_size > 0 )
xvid_enc_create.max_key_interval = avctx->gop_size;
else
@@ -551,8 +551,8 @@ void xvid_correct_framerate(AVCodecContext *avctx) {
int gcd;
float est_fps, fps;
- frate = avctx->frame_rate;
- fbase = avctx->frame_rate_base;
+ frate = avctx->time_base.den;
+ fbase = avctx->time_base.num;
gcd = ff_gcd(frate, fbase);
if( gcd > 1 ) {
@@ -561,8 +561,8 @@ void xvid_correct_framerate(AVCodecContext *avctx) {
}
if( frate <= 65000 && fbase <= 65000 ) {
- avctx->frame_rate = frate;
- avctx->frame_rate_base = fbase;
+ avctx->time_base.den = frate;
+ avctx->time_base.num = fbase;
return;
}
@@ -583,14 +583,14 @@ void xvid_correct_framerate(AVCodecContext *avctx) {
}
if( fbase > est_fbase ) {
- avctx->frame_rate = est_frate;
- avctx->frame_rate_base = est_fbase;
+ avctx->time_base.den = est_frate;
+ avctx->time_base.num = est_fbase;
av_log(avctx, AV_LOG_DEBUG,
"XviD: framerate re-estimated: %.2f, %.3f%% correction\n",
est_fps, (((est_fps - fps)/fps) * 100.0));
} else {
- avctx->frame_rate = frate;
- avctx->frame_rate_base = fbase;
+ avctx->time_base.den = frate;
+ avctx->time_base.num = fbase;
}
}