From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id DE0544636F for ; Thu, 15 Jun 2023 15:19:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CF4C768C515; Thu, 15 Jun 2023 18:19:03 +0300 (EEST) Received: from mail-oa1-f51.google.com (mail-oa1-f51.google.com [209.85.160.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8343068C4F3 for ; Thu, 15 Jun 2023 18:18:57 +0300 (EEST) Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-1a68c02553aso4608538fac.0 for ; Thu, 15 Jun 2023 08:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686842336; x=1689434336; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=oUPArqnml6kppHRJCBiz8RAuluXEh0fszj+lNok5+Pg=; b=mpGY9kamh1/rVuascJ91f3lkwPO15Ta50PX6yohie5QInfx+qrhTJXNZ+NIheRDdq6 JUN5mEDv3d5ZO5UJ8raEpYow4bBzQUqNX8nJyJ4UCyZX10oijTVFLLZR6lztrs3Nldu9 l2KlImTNbUXw2O1TPcGM5T6eHdcPE2ozlhG7J5EFRyjZIxsECtIVM4JvOSLAdxXoV83Z E5i7tE2i78vjOMKHF5f02Drkv2eSOwjb3r9cqHLxcluHgtsbddJNelsn61n97hI4xVqi 9R54eEhdt16INa45b8jE0RycxyJtMGn4oIHgO63jGdvdnU5K7JOH9tlZzzRofzQKNghf nlBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686842336; x=1689434336; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oUPArqnml6kppHRJCBiz8RAuluXEh0fszj+lNok5+Pg=; b=UaghoI5iSMNEAAZEoyEHhrWn5sT88cIAzEHB3V51iX5kE8Gz3X8Zo7iT6XbD2Or8N5 xSAkXYp6Lkv5KsPaF88eJMWg+qqAi8K4l6OTataDBzCohGSahwfUOsGE8UEIR5v75bfv IjhDpPngfXvi/tGYa4OO6SgLyuQTLJEUQS0wpULumrpPnq5l1lXi/JYK05qht5x1kp3W isQmN63V4C12twaMTaCzmo/2qlLVivo0WDD8pC3tIH/cOw5s1kP1/2cMD+Pvz75zF4ic jV5CBvkFMHHmCyB1OTR8uOPIx8538g6Gccg+yfuR379KPnZ5DAjLWF97nLpZAtEZNNqT oFWw== X-Gm-Message-State: AC+VfDyFkIFvH67gl22CDuaDsdndb3Lim70OSJcNQQXeijy10YMfpxpm T8unYgGKodOgTpdZe/KmLXhovsAfkN8= X-Google-Smtp-Source: ACHHUZ7VN3Ivkpr7BU1H9IThR2WUV1lJRvNtn7p4TLiwCbwMaWHGg5wQ/8ZYQqLs/vxgQoKJcT5oOQ== X-Received: by 2002:a05:6870:d302:b0:1a2:c149:99ce with SMTP id f2-20020a056870d30200b001a2c14999cemr13884479oag.10.1686842335829; Thu, 15 Jun 2023 08:18:55 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id ve17-20020a0568710c1100b001a6a3f99691sm4748405oab.27.2023.06.15.08.18.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 08:18:55 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Jun 2023 12:18:27 -0300 Message-ID: <20230615151836.50535-3-jamrial@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230615151836.50535-1-jamrial@gmail.com> References: <20230615151836.50535-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 03/11] avcodec/evc_parser: export framerate to the AVCodecContext X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Signed-off-by: James Almer --- libavcodec/evc_parse.c | 15 +++++++-------- libavcodec/evc_parser.c | 1 + 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/evc_parse.c b/libavcodec/evc_parse.c index f69d7ffb6b..68f0d31f96 100644 --- a/libavcodec/evc_parse.c +++ b/libavcodec/evc_parse.c @@ -605,14 +605,13 @@ int ff_evc_parse_nal_unit(EVCParserContext *ctx, const uint8_t *buf, int buf_siz if (sps->profile_idc == 1) ctx->profile = FF_PROFILE_EVC_MAIN; else ctx->profile = FF_PROFILE_EVC_BASELINE; - if (sps->vui_parameters_present_flag) { - if (sps->vui_parameters.timing_info_present_flag) { - int64_t num = sps->vui_parameters.num_units_in_tick; - int64_t den = sps->vui_parameters.time_scale; - if (num != 0 && den != 0) - av_reduce(&ctx->framerate.den, &ctx->framerate.num, num, den, 1 << 30); - } - } + if (sps->vui_parameters_present_flag && sps->vui_parameters.timing_info_present_flag) { + int64_t num = sps->vui_parameters.num_units_in_tick; + int64_t den = sps->vui_parameters.time_scale; + if (num != 0 && den != 0) + av_reduce(&ctx->framerate.den, &ctx->framerate.num, num, den, 1 << 30); + } else + ctx->framerate = (AVRational) { 0, 1 }; bit_depth = sps->bit_depth_chroma_minus8 + 8; ctx->format = AV_PIX_FMT_NONE; diff --git a/libavcodec/evc_parser.c b/libavcodec/evc_parser.c index 639dcbd135..5feb673b04 100644 --- a/libavcodec/evc_parser.c +++ b/libavcodec/evc_parser.c @@ -71,6 +71,7 @@ static int parse_nal_units(AVCodecParserContext *s, AVCodecContext *avctx, const s->format = ctx->format; + avctx->framerate = ctx->framerate; avctx->gop_size = ctx->gop_size; avctx->delay = ctx->delay; avctx->profile = ctx->profile; -- 2.41.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".