From patchwork Sat Apr 22 09:04:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Faiz X-Patchwork-Id: 3470 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.3.129 with SMTP id 123csp652767vsd; Sat, 22 Apr 2017 02:13:23 -0700 (PDT) X-Received: by 10.223.157.37 with SMTP id k37mr863731wre.156.1492852402927; Sat, 22 Apr 2017 02:13:22 -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 r195si5988309wmb.166.2017.04.22.02.13.22; Sat, 22 Apr 2017 02:13:22 -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 5B99C689A39; Sat, 22 Apr 2017 12:13:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8E160689A22 for ; Sat, 22 Apr 2017 12:13:13 +0300 (EEST) Received: by mail-it0-f65.google.com with SMTP id z67so3463490itb.0 for ; Sat, 22 Apr 2017 02:13:13 -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=46WOchyq4WnIrJm4X/SYfNymye3zb7hwSSV7zHNSFzw=; b=pswAYFby/EULlVKyE8FU7MkUZXE5+5qUNbez9oou3AUvMT3JB+Tuq/BXEmChTC9nAR jN7jfvf2Fx74vsFjsgAba6ILms/OFcbu3iK7qUhxIJg13kmy9xGuEmK0yo73drYZNBJD y3kVCXxeCRFcHoXpeoPijOLpmqeUQjFa8GjovqYkquyQSmQ5Gu6T0G/j6+rOek4gKRWp bYY1D01Xuy9Xjn0iM07QNGLnW7YtrTwBq4vFk7rTSLXCfA5QrelPXd9eRszxZPlTSEKm eplsmsoCFypCVG8ahpYdcW4nyHGRawbe3WE0k8sUIgcFRJXcgsoiJE44jsKlB3rvjyKL Qz2w== 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=46WOchyq4WnIrJm4X/SYfNymye3zb7hwSSV7zHNSFzw=; b=H2aHs8KLpuSfxha8OhSgjinUgPIPRerNH623b8BUn/pGJXLEZPSMDf6xRacEDp0v2Y ixh6VaGtncKsq0fhYI/kMTRJNtWIe44wuteMKjdnhUQib3TyKFfkZFpyQT5wwmj9WuFG n6nDCo5y+/wu24CP30SGsCSJpnuAXAneo5x8kCt+z5cI1jTj/NdEiiBqOCLh+pf59lYn TjAkV0/EU3t7DYBgz412dfkZ6GV25o8AC84JwCCpjb6dHMbTYyw6yVjrXMVPHVE2ZPPM BsNu+v0JN98HrRMY5+7QWZFrm7e/2yYket1z93wuFtdaHoEqViZ5UsJHekrKb4Q/D6A5 7HYw== X-Gm-Message-State: AN3rC/7rJ61R2SCkiW1LtQXtEAbKDzJBZgsmvkQRexZSFi6qH7RKMYAN v5lYCsb9N17T2Q== X-Received: by 10.84.210.10 with SMTP id z10mr20679424plh.173.1492851896864; Sat, 22 Apr 2017 02:04:56 -0700 (PDT) Received: from localhost.localdomain ([114.120.232.5]) by smtp.gmail.com with ESMTPSA id o10sm20296935pgc.18.2017.04.22.02.04.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Apr 2017 02:04:56 -0700 (PDT) From: Muhammad Faiz To: ffmpeg-devel@ffmpeg.org Date: Sat, 22 Apr 2017 16:04:23 +0700 Message-Id: <20170422090428.6459-2-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 2/7] avformat: 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 --- libavformat/mux.c | 2 +- libavformat/uncodedframecrcenc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mux.c b/libavformat/mux.c index 3a5e876..4e21083 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -1422,7 +1422,7 @@ static int av_write_uncoded_frame_internal(AVFormatContext *s, int stream_index, pkt.size = UNCODED_FRAME_PACKET_SIZE; pkt.pts = pkt.dts = frame->pts; - pkt.duration = av_frame_get_pkt_duration(frame); + pkt.duration = frame->pkt_duration; pkt.stream_index = stream_index; pkt.flags |= AV_PKT_FLAG_UNCODED_FRAME; } diff --git a/libavformat/uncodedframecrcenc.c b/libavformat/uncodedframecrcenc.c index ecc42d2..2f1a14c 100644 --- a/libavformat/uncodedframecrcenc.c +++ b/libavformat/uncodedframecrcenc.c @@ -79,7 +79,7 @@ static void audio_frame_cksum(AVBPrint *bp, AVFrame *frame) int nb_planes, nb_samples, p; const char *name; - nb_planes = av_frame_get_channels(frame); + nb_planes = frame->channels; nb_samples = frame->nb_samples; if (!av_sample_fmt_is_planar(frame->format)) { nb_samples *= nb_planes;