Showing the changes to libavcodec (2 of 2 files). Show all
Unified · Split
| @@ -605,14 +605,13 @@ int ff_evc_parse_nal_unit(EVCParserContext *ctx, const uint8_t *buf, int buf_siz · 604 unmodified lines | ||
| 605 | 605 | if (sps->profile_idc == 1) ctx->profile = FF_PROFILE_EVC_MAIN; |
| 606 | 606 | else ctx->profile = FF_PROFILE_EVC_BASELINE; |
| 607 | 607 | |
| 608 | − if (sps->vui_parameters_present_flag) { | |
| 609 | − if (sps->vui_parameters.timing_info_present_flag) { | |
| 610 | − int64_t num = sps->vui_parameters.num_units_in_tick; | |
| 611 | − int64_t den = sps->vui_parameters.time_scale; | |
| 612 | − if (num != 0 && den != 0) | |
| 613 | − av_reduce(&ctx->framerate.den, &ctx->framerate.num, num, den, 1 << 30); | |
| 614 | − } | |
| 615 | − } | |
| 608 | + if (sps->vui_parameters_present_flag && sps->vui_parameters.timing_info_present_flag) { | |
| 609 | + int64_t num = sps->vui_parameters.num_units_in_tick; | |
| 610 | + int64_t den = sps->vui_parameters.time_scale; | |
| 611 | + if (num != 0 && den != 0) | |
| 612 | + av_reduce(&ctx->framerate.den, &ctx->framerate.num, num, den, 1 << 30); | |
| 613 | + } else | |
| 614 | + ctx->framerate = (AVRational) { 0, 1 }; | |
| 616 | 615 | |
| 617 | 616 | bit_depth = sps->bit_depth_chroma_minus8 + 8; |
| 618 | 617 | ctx->format = AV_PIX_FMT_NONE; |
| @@ -71,6 +71,7 @@ static int parse_nal_units(AVCodecParserContext *s, AVCodecContext *avctx, const · 70 unmodified lines | ||
| 71 | 71 | |
| 72 | 72 | s->format = ctx->format; |
| 73 | 73 | |
| 74 | + avctx->framerate = ctx->framerate; | |
| 74 | 75 | avctx->gop_size = ctx->gop_size; |
| 75 | 76 | avctx->delay = ctx->delay; |
| 76 | 77 | avctx->profile = ctx->profile; |