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 A6FFD42B79 for ; Wed, 27 Apr 2022 14:07:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 65C7468B45B; Wed, 27 Apr 2022 17:07:26 +0300 (EEST) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AB17268B441 for ; Wed, 27 Apr 2022 17:07:19 +0300 (EEST) Received: by mail-lf1-f44.google.com with SMTP id x17so3317847lfa.10 for ; Wed, 27 Apr 2022 07:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=SNIT8vRR3LEV5VkzZPpVBFMrZs/I4209lDbTXQPErTA=; b=CbPpkA/kz8dW/ztWrtDMWUkNt2S5x+XFAUONg5p+RK6R3HTAL9gmcwhKmBQvazZUOm e00Gd4QxA2wwHH1VHbbMCZKcagTpqA8gl3v0LUpmOG5b7f2NsYZ8A3dN2l9HhbCHXEBc uobxwzTlKWBHCPNx00tuAMvi/SM0eG613S9gMqkHxBgS5CXOI20leEBT4GfxQv8RE7OR 5YyXj9eh2clHN0I1jtFIx/OuwC8in7BlGvtDKeg6QeAKVZb1eFEUQcqHG1GKUXU3TR1u DwO8HJFrByv0OpRtwSyuot6cn9us2+x6A6jG9p/2nCXrgDi2GQ6LCSImOZyNZYMsSYXT o+8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=SNIT8vRR3LEV5VkzZPpVBFMrZs/I4209lDbTXQPErTA=; b=y7EcBkwy1H97o0YoAeHu4ex7xp8RkEMRTMyi+vsOjnn9JHloO+HG5ENuLKj4qZM+Gi waIkqUNxLx4BbQBxa1nC6e5cn/eegJkh4xX8Sd8w1zho2+X1p1ICq81m2KPsw52Gd5Eq 6wQXmtrOrgabhgH/5GE63eN2iKfQA9uYFfsKnbUCcu+LQ2HM01N6EItU2/y0uB4LTsBk i2PPIl+IKciVTNGz6hOvjqba0/TtpeVpNHdq3e8rbhNPZcBcrPfK0tw0dQOQtA8hbgUv 9uwqc5N/qqLEVKizmoikdrppZBFx1yoMnd47FaDTcXV4ZTltHbCSG3XYCpZFACWrRTPe FpBQ== X-Gm-Message-State: AOAM532yR5dAt2X+Ok0WHNXHY27lquB2pqHG3fRDHPcNNkQMvMfptx3S 8uBLrn2jtnABNKc8BB3avHL4jyVM1ntF5KncdEZJLtoB2eGBeg== X-Google-Smtp-Source: ABdhPJwtWGxZyBBiB/s47bYRaLyU+NTpy+gu78UfIPD3yai3HM5E7cxML3y1Led/QQacyVP9mvk/LjSCFMd8Wt3Ge6g= X-Received: by 2002:a05:6512:3992:b0:472:31ef:cd80 with SMTP id j18-20020a056512399200b0047231efcd80mr1106988lfu.532.1651068438943; Wed, 27 Apr 2022 07:07:18 -0700 (PDT) MIME-Version: 1.0 From: Andreas Unterweger Date: Wed, 27 Apr 2022 16:07:09 +0200 Message-ID: To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v4 2/2] doc/examples/transcode_aac: Set decoder packet timebase 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: Previously, the default timebase caused two warnings during decoding about not being able to update timestamps for skipped and discarded samples, respectively. Signed-off-by: Andreas Unterweger --- doc/examples/transcode_aac.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/examples/transcode_aac.c b/doc/examples/transcode_aac.c index c9b93f6439..6197369756 100644 --- a/doc/examples/transcode_aac.c +++ b/doc/examples/transcode_aac.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018 Andreas Unterweger + * Copyright (c) 2013-2022 Andreas Unterweger * * This file is part of FFmpeg. * @@ -120,6 +120,10 @@ static int open_input_file(const char *filename, avformat_close_input(input_format_context); return error; } + + /* Set the packet timebase for the decoder. The input file's sample + * rate is used as the denominator for simplicity. */ + avctx->pkt_timebase = (AVRational) { 1, avctx->sample_rate }; /* Save the decoder context for easier access later. */ *input_codec_context = avctx; -- 2.30.2 _______________________________________________ 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".