summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_ps.c
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2013-12-10 15:37:22 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-10 16:20:53 +0100
commitf90281ca97d45a87e3671f5e6e64794f2632fef2 (patch)
tree4bb69719f69bc821eb387c299f50548c3cc4542c /libavcodec/hevc_ps.c
parent679a6377e4948bce6e2cb28cf7ced4b1738e906e (diff)
hevc: Correctly set time_base
- Try reading the time_base information from the VPS too, not just the VUI - Only set time_base when an SPS is activated, not when it's decoded. - Reduce the fraction before setting it. - Don't set anything if the fraction is invalid (because the VUI is not present or because the encoded value is invalid). Conflicts: libavcodec/hevc_ps.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r--libavcodec/hevc_ps.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 988a53948e..63b5ddd25c 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -511,8 +511,6 @@ static void decode_vui(HEVCContext *s, HEVCSPS *sps)
if (vui->vui_timing_info_present_flag) {
vui->vui_num_units_in_tick = get_bits(gb, 32);
vui->vui_time_scale = get_bits(gb, 32);
- s->avctx->time_base.num = vui->vui_num_units_in_tick;
- s->avctx->time_base.den = vui->vui_time_scale;
vui->vui_poc_proportional_to_timing_flag = get_bits1(gb);
if (vui->vui_poc_proportional_to_timing_flag)
vui->vui_num_ticks_poc_diff_one_minus1 = get_ue_golomb_long(gb);