summaryrefslogtreecommitdiff
path: root/libavcodec/vc1.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-04-04 12:47:44 +0200
committerAnton Khirnov <anton@khirnov.net>2014-10-15 06:37:43 +0000
commit7ea1b3472a61de4aa4d41b571e99418e4997ad41 (patch)
treefcf38bb7d5d1f770f1e4b8fea256fa6c45313add /libavcodec/vc1.c
parentd565fef1b83b6c5f8afb32229260b79f67c68109 (diff)
lavc: deprecate the use of AVCodecContext.time_base for decoding
When decoding, this field holds the inverse of the framerate that can be written in the headers for some codecs. Using a field called 'time_base' for this is very misleading, as there are no timestamps associated with it. Furthermore, this field is used for a very different purpose during encoding. Add a new field, called 'framerate', to replace the use of time_base for decoding.
Diffstat (limited to 'libavcodec/vc1.c')
-rw-r--r--libavcodec/vc1.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index cef0fe6eb8..6f1191023f 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -485,19 +485,19 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
if (get_bits1(gb)) { //framerate stuff
if (get_bits1(gb)) {
- v->s.avctx->time_base.num = 32;
- v->s.avctx->time_base.den = get_bits(gb, 16) + 1;
+ v->s.avctx->framerate.den = 32;
+ v->s.avctx->framerate.num = get_bits(gb, 16) + 1;
} else {
int nr, dr;
nr = get_bits(gb, 8);
dr = get_bits(gb, 4);
if (nr > 0 && nr < 8 && dr > 0 && dr < 3) {
- v->s.avctx->time_base.num = ff_vc1_fps_dr[dr - 1];
- v->s.avctx->time_base.den = ff_vc1_fps_nr[nr - 1] * 1000;
+ v->s.avctx->framerate.den = ff_vc1_fps_dr[dr - 1];
+ v->s.avctx->framerate.num = ff_vc1_fps_nr[nr - 1] * 1000;
}
}
if (v->broadcast) { // Pulldown may be present
- v->s.avctx->time_base.den *= 2;
+ v->s.avctx->framerate.num *= 2;
v->s.avctx->ticks_per_frame = 2;
}
}