From patchwork Sat Jun 26 20:00:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liudingming X-Patchwork-Id: 28718 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5d:965a:0:0:0:0:0 with SMTP id d26csp574784ios; Sat, 26 Jun 2021 13:01:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjaBFdtProviEvmOP02u3/HiuNXtMZa9iD9Uwn7nXIjbGG++1LXBkxQDbPvlZ/loN3Gg3P X-Received: by 2002:aa7:ccc1:: with SMTP id y1mr4567034edt.321.1624737677532; Sat, 26 Jun 2021 13:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624737677; cv=none; d=google.com; s=arc-20160816; b=aC/SSq07q39sJaWZi9Lzryf6zcCQFbYkaTJxAEtqtEyH5HqU19ChXTqVZ4aF1PeKye el/A1QE1JAzrRHKle5/kwNWH70Pom6Oa/qzBiBsUm9IlhIv7k2PXzKQ+gbEcDk7xi0t2 7Z7k1owQ5KWdhCXHSEZMFdgy66V+zBigNW+0MJnC00sySc+L9u520ifuJqGqvji/1kDh JzjTexljm+WbJD1ptNfoy8/RNF/8S6kXrJKHcptIWonR1n1+mUppwqW9rAv+6j9LqudT n4TEHwAACiGSnwb/MgB0vFfzoceWddoXmxAIfp9exmxQ44cY2i5BZAEmWx89oASstOB7 kTLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=TaKS8uQ3Yf0/t9zxHhdWqbzTlRQSnkuUe/rO8/YeFOg=; b=bYBbViJCvOetsIWXzR5Eo3axuqU6MSAmb+llct1+nucQXrGvp3YNo1Ff5siwGwUvMl H48ckmguF4hza6o55aGEAGhUlP+kzdN5FVwKRokfAAI+xhffbe0qOYkpDhCbmtD9HSmW HnCajoB0YyBCVut9qcYuVSdd+llQdy36nNVnJPtTzG/QXJHrYwn45dcb4PlM4g4C1WsL vs6yBCzaaXF5djcAnl8AMBW8q+q7WkPHey0QT0xbFaF4laJSzqPIGk5cE4j1lKOXuxcw K6NBo1oQkw27hV9vMceLoph3pwKs2JJShVXlVboQ9r7FLLB/LD6VrKWHDA49v2WGX21p WojQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=HMt7YNRn; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ec4si10567321ejb.244.2021.06.26.13.01.16; Sat, 26 Jun 2021 13:01:17 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=HMt7YNRn; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A3D68689F02; Sat, 26 Jun 2021 23:01:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 649086881F1 for ; Sat, 26 Jun 2021 23:01:06 +0300 (EEST) Received: by mail-pl1-f182.google.com with SMTP id m17so6529046plx.7 for ; Sat, 26 Jun 2021 13:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CpXfvttOIG9YvRZbFljjOZ90ZW258JwWRUqxmkR6awE=; b=HMt7YNRnFYOTf/mwYyg0fXQu+W+dMBmVkyRekRWHlsV6IRqNqifQP5XyfoRva9v1W4 Hc3alEikg7VNiWKJHCliiZo1w7Koq3VoFUfWN6bKflSBMYdsg9udt6M95qy1BVmlNf+/ gE3gSrr4fr2njPTZnZWDe+RxZQME3a7+9PGgLYNjWXKeNuDYr+WnEwqcQB1E6bVNQ817 yzHu38D3+Wa1L2ykozzaOVzHBWLDhlWAVaICYPcMLPR5/PwgDQyvUn+X7PFIkV92TQlW 2QyUJO9KKP+ONllKf9I9p3UD5kNVVzhsVQ9bXEpRPTLelcC0lmf/3c89rE5nPAYfpBzf WL6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CpXfvttOIG9YvRZbFljjOZ90ZW258JwWRUqxmkR6awE=; b=K+hAPAPOWtiP5fX8Mc18X6dnH6u+vibZXP2/4zan/e8wZGsUlMQa3cyd1fJW9DMEuK B/TLh6v89CwPB/c4SyMXbFsM7CW+s4lJi8yHKSpJbEVHKoGTdk4j2wDBDXMFWB4rfk4+ ZfMmHSZtuZfprogsaN8tSogG895lgl54VKvU1pw2ze0eFlbzWzHBII9LfYQeuMyNZ8aZ Bg75Bmqf1rU5HudJOQ4ubbdBg9dabXJVd3gZP2kAu/gLSszFPt4Ie/a30rdu3GesNnO+ 0c0KwvRU1FSeOfjJ5jo8BXJ0P0zw66pjL80eNmFFp3ESDyW+nd0dLRBARVHqol+D1i1z oqxA== X-Gm-Message-State: AOAM532syGrjstCc0JhSX54/PG27sS7Tf180jnitBk8WmIRj+iS2C1uy 6XEFYE4VtSvyq0Hnayr+QHiDanla5nmS48wx X-Received: by 2002:a17:90a:708:: with SMTP id l8mr28306490pjl.103.1624737664274; Sat, 26 Jun 2021 13:01:04 -0700 (PDT) Received: from localhost.localdomain ([139.177.225.228]) by smtp.gmail.com with ESMTPSA id w123sm9749451pff.186.2021.06.26.13.01.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Jun 2021 13:01:04 -0700 (PDT) From: liudingming To: ffmpeg-devel@ffmpeg.org Date: Sun, 27 Jun 2021 04:00:57 +0800 Message-Id: <20210626200057.28220-1-liudingming@bytedance.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] Fix wrong time base in example 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 Cc: liudingming Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: quKsUzpvhJKD Signed-off-by: liudingming --- doc/examples/transcoding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/examples/transcoding.c b/doc/examples/transcoding.c index 3a97426e2c..ea6ffefc70 100644 --- a/doc/examples/transcoding.c +++ b/doc/examples/transcoding.c @@ -171,7 +171,7 @@ static int open_output_file(const char *filename) else enc_ctx->pix_fmt = dec_ctx->pix_fmt; /* video time_base can be set to whatever is handy and supported by encoder */ - enc_ctx->time_base = av_inv_q(dec_ctx->framerate); + enc_ctx->time_base = av_inv_q(av_mul_q(dec_ctx->framerate, (AVRational){dec_ctx->ticks_per_frame, 1})); } else { enc_ctx->sample_rate = dec_ctx->sample_rate; enc_ctx->channel_layout = dec_ctx->channel_layout;