for (;;) {
int src_length, consumed;
int ret;
+ int num = 0, den = 0;
buf = avpriv_find_start_code(buf, buf_end, &state);
if (--buf + 2 >= buf_end)
break;
avctx->profile = ps->sps->ptl.general_ptl.profile_idc;
avctx->level = ps->sps->ptl.general_ptl.level_idc;
+ if (ps->vps->vps_timing_info_present_flag) {
+ num = ps->vps->vps_num_units_in_tick;
+ den = ps->vps->vps_time_scale;
+ } else if (ps->sps->vui.vui_timing_info_present_flag) {
+ num = ps->sps->vui.vui_num_units_in_tick;
+ den = ps->sps->vui.vui_time_scale;
+ }
+
+ if (num != 0 && den != 0)
+ av_reduce(&avctx->framerate.den, &avctx->framerate.num,
+ num, den, 1 << 30);
+
if (!sh->first_slice_in_pic_flag) {
int slice_address_length;