diff options
author | Clément Bœsch <ubitux@gmail.com> | 2012-08-06 01:25:27 +0400 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-08-06 02:04:36 +0400 |
commit | 16dc5f20505d39042d06bc4b09a01e8a4558fa2b (patch) | |
tree | 774929bc39ffafaa20d7e95d5753ba920066c2c4 /libavdevice | |
parent | ad55244c9674bc52f383a967e0d1502e8a8928e9 (diff) |
Replace various inlined inverse AVRational with av_inv_q().
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/fbdev.c | 2 | ||||
-rw-r--r-- | libavdevice/vfwcap.c | 2 | ||||
-rw-r--r-- | libavdevice/x11grab.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/libavdevice/fbdev.c b/libavdevice/fbdev.c index 93f7ce3763..6d6bff5d0a 100644 --- a/libavdevice/fbdev.c +++ b/libavdevice/fbdev.c @@ -164,7 +164,7 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx) st->codec->width = fbdev->width; st->codec->height = fbdev->height; st->codec->pix_fmt = pix_fmt; - st->codec->time_base = (AVRational){fbdev->framerate_q.den, fbdev->framerate_q.num}; + st->codec->time_base = av_inv_q(fbdev->framerate_q); st->codec->bit_rate = fbdev->width * fbdev->height * fbdev->bytes_per_pixel * av_q2d(fbdev->framerate_q) * 8; diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c index d8e32cec41..2809c56702 100644 --- a/libavdevice/vfwcap.c +++ b/libavdevice/vfwcap.c @@ -372,7 +372,7 @@ static int vfw_read_header(AVFormatContext *s) goto fail; codec = st->codec; - codec->time_base = (AVRational){framerate_q.den, framerate_q.num}; + codec->time_base = av_inv_q(framerate_q); codec->codec_type = AVMEDIA_TYPE_VIDEO; codec->width = bi->bmiHeader.biWidth; codec->height = bi->bmiHeader.biHeight; diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c index 6202bbc3f4..566889cb16 100644 --- a/libavdevice/x11grab.c +++ b/libavdevice/x11grab.c @@ -302,7 +302,7 @@ x11grab_read_header(AVFormatContext *s1) x11grab->frame_size = x11grab->width * x11grab->height * image->bits_per_pixel/8; x11grab->dpy = dpy; - x11grab->time_base = (AVRational){framerate.den, framerate.num}; + x11grab->time_base = av_inv_q(framerate); x11grab->time_frame = av_gettime() / av_q2d(x11grab->time_base); x11grab->x_off = x_off; x11grab->y_off = y_off; |