summaryrefslogtreecommitdiff
path: root/modules/avformat/avformat.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/avformat/avformat.c')
-rw-r--r--modules/avformat/avformat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/avformat/avformat.c b/modules/avformat/avformat.c
index ec1e79b..5e134de 100644
--- a/modules/avformat/avformat.c
+++ b/modules/avformat/avformat.c
@@ -308,6 +308,7 @@ static int alloc(struct vidsrc_st **stp, const struct vidsrc *vs,
for (i=0; i<st->ic->nb_streams; i++) {
const struct AVStream *strm = st->ic->streams[i];
AVCodecContext *ctx;
+ double dfps;
#if LIBAVFORMAT_VERSION_INT >= ((57<<16) + (33<<8) + 100)
@@ -342,7 +343,8 @@ static int alloc(struct vidsrc_st **stp, const struct vidsrc *vs,
st->sindex = strm->index;
st->time_base = strm->time_base;
- input_fps = (int) 1 * av_q2d(strm->avg_frame_rate);
+ dfps = av_q2d(strm->avg_frame_rate);
+ input_fps = (int)dfps;
if (st->fps != input_fps) {
info("avformat: updating %i fps from config to native "
"input material fps %i\n", st->fps, input_fps);