summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-08-05 23:25:27 +0200
committerClément Bœsch <ubitux@gmail.com>2012-08-06 00:04:36 +0200
commit16dc5f20505d39042d06bc4b09a01e8a4558fa2b (patch)
tree774929bc39ffafaa20d7e95d5753ba920066c2c4 /ffmpeg.c
parentad55244c9674bc52f383a967e0d1502e8a8928e9 (diff)
Replace various inlined inverse AVRational with av_inv_q().
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 2d979c9160..ecf9aca7c4 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3188,7 +3188,7 @@ static int transcode_init(void)
}
if(ost->frame_rate.num)
- codec->time_base = (AVRational){ost->frame_rate.den, ost->frame_rate.num};
+ codec->time_base = av_inv_q(ost->frame_rate);
av_reduce(&codec->time_base.num, &codec->time_base.den,
codec->time_base.num, codec->time_base.den, INT_MAX);
@@ -3281,7 +3281,7 @@ static int transcode_init(void)
codec->time_base = (AVRational){ 1, codec->sample_rate };
break;
case AVMEDIA_TYPE_VIDEO:
- codec->time_base = (AVRational){ost->frame_rate.den, ost->frame_rate.num};
+ codec->time_base = av_inv_q(ost->frame_rate);
if (ost->filter && !(codec->time_base.num && codec->time_base.den))
codec->time_base = ost->filter->filter->inputs[0]->time_base;
if ( av_q2d(codec->time_base) < 0.001 && video_sync_method != VSYNC_PASSTHROUGH