From patchwork Sat Apr 22 09:04:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Faiz X-Patchwork-Id: 3467 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.3.129 with SMTP id 123csp650708vsd; Sat, 22 Apr 2017 02:05:27 -0700 (PDT) X-Received: by 10.28.87.70 with SMTP id l67mr2078998wmb.37.1492851927473; Sat, 22 Apr 2017 02:05:27 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h13si18163207wrc.165.2017.04.22.02.05.27; Sat, 22 Apr 2017 02:05:27 -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=@gmail.com; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 308DF689A3E; Sat, 22 Apr 2017 12:05:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it0-f68.google.com (mail-it0-f68.google.com [209.85.214.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 425246899C6 for ; Sat, 22 Apr 2017 12:05:10 +0300 (EEST) Received: by mail-it0-f68.google.com with SMTP id x188so2655716itb.3 for ; Sat, 22 Apr 2017 02:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QzWir0PVHeSURplpOINmjk5R2yOu4UkLeY3bioE6mYw=; b=FDJ1vU6RoCCnMFD+1uhi3UWH4zhdm3WEExiYkeLi0N0jNDPiGu6Z+Fbu71Xx17GT5D Yj/kukNRC1Tq7AGv6nqtg0QEiI8sl/Jar8A9OkBDXec2HQHP73rsfgNpGFsL0PjUvwKN z4RXVI3xQMca/JPpIB1lJ9/g3mzTdYNOTJGWOmvfez/y5K1YmpE1YSgeSlcqV44fDt/t RgrSGYNQwzrxqg50YqeRTt5c+XhvxFm2L+Y8F5sb11zLCvz9OQxANXfqXV9zis8jR3Dl tS8WHTt4kLXjt+f2+tlIe/+GxpDE5eB2VHOqgp9HwZCTjoIK3MwQufEFdKax6d/ws1io 0L9g== 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:in-reply-to :references; bh=QzWir0PVHeSURplpOINmjk5R2yOu4UkLeY3bioE6mYw=; b=aac+ypI7YYvQkAXPhRhO4a1BXMcnzFisJwUsMrxmd37VL/8hX+UedIpN31TJWZ34R6 ULCClYos34lNlztXhqfN26CSFCiA1aebZoh1PnXlr+d5c1C2Q/Oj+lSVPkzlVT3KEnyA TaHLWuEPXZh+vsnQU083l6UHf47VRQmrRPTHPrNkDDc19/cfsw79NoesBLJWwMa5f/rK tbRsX5YctaJfHUkrh4ckEryP2hKhsA9+ROPFeQKyVDQfOlhhyIyqS8/yurMlb6/C8gAP APL2ySLBU0De9wQzt/v5gNTd/Bcw0umMpPNvAf17QOI3nGuhUS+K07zTn1LkxCpaymyo q/3A== X-Gm-Message-State: AN3rC/7YRKaVAAIofKm2JcVm7k4Fn37O0TOgoBJGhl5/77hRDuGSwAKV x5FAz5GXSf4gtA== X-Received: by 10.84.168.69 with SMTP id e63mr20570648plb.124.1492851909171; Sat, 22 Apr 2017 02:05:09 -0700 (PDT) Received: from localhost.localdomain ([114.120.232.5]) by smtp.gmail.com with ESMTPSA id o10sm20296935pgc.18.2017.04.22.02.05.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Apr 2017 02:05:08 -0700 (PDT) From: Muhammad Faiz To: ffmpeg-devel@ffmpeg.org Date: Sat, 22 Apr 2017 16:04:27 +0700 Message-Id: <20170422090428.6459-6-mfcc64@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170422090428.6459-1-mfcc64@gmail.com> References: <20170422090428.6459-1-mfcc64@gmail.com> Subject: [FFmpeg-devel] [PATCH 6/7] examples: do not use AVFrame accessor X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Muhammad Faiz MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Muhammad Faiz --- doc/examples/filtering_audio.c | 2 +- doc/examples/filtering_video.c | 2 +- doc/examples/transcoding.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c index 679218c..9fc4f1c 100644 --- a/doc/examples/filtering_audio.c +++ b/doc/examples/filtering_audio.c @@ -201,7 +201,7 @@ end: static void print_frame(const AVFrame *frame) { - const int n = frame->nb_samples * av_get_channel_layout_nb_channels(av_frame_get_channel_layout(frame)); + const int n = frame->nb_samples * av_get_channel_layout_nb_channels(frame->channel_layout); const uint16_t *p = (uint16_t*)frame->data[0]; const uint16_t *p_end = p + n; diff --git a/doc/examples/filtering_video.c b/doc/examples/filtering_video.c index 4d97302..4e09c6f 100644 --- a/doc/examples/filtering_video.c +++ b/doc/examples/filtering_video.c @@ -253,7 +253,7 @@ int main(int argc, char **argv) } if (ret >= 0) { - frame->pts = av_frame_get_best_effort_timestamp(frame); + frame->pts = frame->best_effort_timestamp; /* push the decoded frame into the filtergraph */ if (av_buffersrc_add_frame_flags(buffersrc_ctx, frame, AV_BUFFERSRC_FLAG_KEEP_REF) < 0) { diff --git a/doc/examples/transcoding.c b/doc/examples/transcoding.c index 476ec69..fb15a21 100644 --- a/doc/examples/transcoding.c +++ b/doc/examples/transcoding.c @@ -558,7 +558,7 @@ int main(int argc, char **argv) } if (got_frame) { - frame->pts = av_frame_get_best_effort_timestamp(frame); + frame->pts = frame->best_effort_timestamp; ret = filter_encode_write_frame(frame, stream_index); av_frame_free(&frame); if (ret < 0)