From patchwork Mon Jan 30 00:37:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 2362 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp1234687vsb; Sun, 29 Jan 2017 16:37:22 -0800 (PST) X-Received: by 10.223.165.87 with SMTP id j23mr19850656wrb.79.1485736642359; Sun, 29 Jan 2017 16:37:22 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d41si14397515wrd.250.2017.01.29.16.37.22; Sun, 29 Jan 2017 16:37:22 -0800 (PST) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 40C9C68A360; Mon, 30 Jan 2017 02:37:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AFD3568A2D1 for ; Mon, 30 Jan 2017 02:37:08 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id B9B25102C39; Mon, 30 Jan 2017 01:37:10 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6yNjB+sSqw5l; Mon, 30 Jan 2017 01:37:09 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 54A91102C36; Mon, 30 Jan 2017 01:37:09 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Mon, 30 Jan 2017 01:37:02 +0100 Message-Id: <20170130003702.26686-1-cus@passwd.hu> X-Mailer: git-send-email 2.10.2 Subject: [FFmpeg-devel] [PATCH] avutil/frame: fix av_frame_copy for unknown layouts 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: Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" I wonder how unknown layouts ever worked without this? Signed-off-by: Marton Balint --- libavutil/frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/frame.c b/libavutil/frame.c index c2f5509..a08e0c5 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -725,7 +725,7 @@ int av_frame_copy(AVFrame *dst, const AVFrame *src) if (dst->width > 0 && dst->height > 0) return frame_copy_video(dst, src); - else if (dst->nb_samples > 0 && dst->channel_layout) + else if (dst->nb_samples > 0 && dst->channels > 0) return frame_copy_audio(dst, src); return AVERROR(EINVAL);