summaryrefslogtreecommitdiff
path: root/libavcodec/vc1_parser.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-15 15:54:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-15 16:08:36 +0200
commit220a15c074876b04760e60aeae5badc7412b2f83 (patch)
tree5f7063fa84c972350911957d2d18bdab34e47194 /libavcodec/vc1_parser.c
parent09450c55092523d073f7ec415f863531838ca908 (diff)
avcodec/vc1: fix time_base and framerate
They are not just inverses of each other. This should restore behavior to before the introduction of framerate Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1_parser.c')
-rw-r--r--libavcodec/vc1_parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c
index 33e672fa0f..3a2308ecc6 100644
--- a/libavcodec/vc1_parser.c
+++ b/libavcodec/vc1_parser.c
@@ -112,6 +112,8 @@ static void vc1_extract_header(AVCodecParserContext *s, AVCodecContext *avctx,
break;
}
+ if (avctx->framerate.num)
+ avctx->time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1}));
}
static int vc1_parse(AVCodecParserContext *s,