From patchwork Wed Apr 18 17:45:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 8493 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.1.85 with SMTP id c82csp3365962jad; Wed, 18 Apr 2018 10:52:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx48NfhslVYVzqe938VD0CNRzMPvnd0nrene7PRDkvP6VcUzNnXVi30UQX1mestYJ9kvCPOLu X-Received: by 2002:adf:e28c:: with SMTP id v12-v6mr2215317wri.188.1524073951307; Wed, 18 Apr 2018 10:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524073951; cv=none; d=google.com; s=arc-20160816; b=uQC2J9Z9/FhodjzcjMrQ4a/nPwn0bojdLk51saSfC5ZcPGmNEWo49MsoKEsyojeQOm 9uRPM+HW6vNcqmSbMPOHxqL7voPdIP+479W1Uj/UqD7VSmrhjo1co0t41Epm+2tBMrAH bYMfay9CWWLNbseKXA3jjNoKdjF30DJC968otSyBgKfenNig0R3RpFRqxuNLzRLKlusD O6yxOmhuXLOIDykP3Lb99iZ8U4I8fqOucgLJ+3zXMZ9ge58ZltKuxX4oHCYRoezei7NW drimHGaT1gytkE+L6ztMEBMPn0hQdgrWP8sbJjn9ce8UUWQZuo+adolWEyYHvsJZRBUw 9HZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to :arc-authentication-results; bh=h+J5YouvGF7r1Jl3asqd3urKK4uZrN/yx9swaTp+5OI=; b=Jljjkz5oKakiZq+1UCT/AmK/VbM0SyD1nnKyGeV4HxNf1vGe8DlLTr101mZgO6vwSp GK9YWPyjvlroXcheDZeiVvYjazHrUL8JUXsGMMY38AF58GeReVw4v4k3omAlYb0C4You NiIItfQ8fgVAY9SLCwHSoSvyneG8mqkXHgbLbpY661AveNxcylDNb8YldKZ2DPGuu5tr LLxk+quxSfPkOPT7xJulQJcxvRsd7OjILd7OEkcOPT6LX4TmhTBKIDD8LAtism3kH0iS /fFiSF/hd900p1+VNNYZQorMFNQNMUjfD2rZKzxt7Qor6lmxWi8tuHvc6ehBR4G3v+z0 CY5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=FL/XQpDS; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q16-v6si1399092wre.417.2018.04.18.10.52.30; Wed, 18 Apr 2018 10:52:31 -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 header.s=20161025 header.b=FL/XQpDS; 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=QUARANTINE 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 4F06068A11B; Wed, 18 Apr 2018 20:52:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it0-f49.google.com (mail-it0-f49.google.com [209.85.214.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 636AB689CC9 for ; Wed, 18 Apr 2018 20:51:55 +0300 (EEST) Received: by mail-it0-f49.google.com with SMTP id 71-v6so3497473ith.2 for ; Wed, 18 Apr 2018 10:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=m5oOKj0qf8DnxVcRZblguD2PBeNjhbR62XlJVGXXN1c=; b=FL/XQpDStZQG8Rb1lfGsDfTIpH1uzpa1ATfq/UzbzR2FVg1U7bbaf6YrbNba/Tip2o nHctoNCfWTTmXGh761zJkYnDv9lT7NKdkr9HgSV4WOKrLpaQ1qh0bSdd90uTqEmbzvZU 8lF5sVWgtwwwQX5XHxE8Bi3/AiQQWTOncIiZ3zsqcFvNx1e4HcWIBrR6bU8LE9ll0YhP AFJmly7w35MVGsBpvFRTO27DKvPgIlzQ7lwRsQ2pv3Kt21RZHSopP0jxfLlphJGYUWgz Gkb7Qqd3FkEf4rW7bkpbJpTfOPvfuHFeEli70o2LhZZUFyToeBLBbDoVG2dxEn/qvJeJ M1ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=m5oOKj0qf8DnxVcRZblguD2PBeNjhbR62XlJVGXXN1c=; b=JejAeSLFA0qTQrfrhwQr9suKAQ+A1cuIZ3/SARqaTBd0qIYx402kltlI7KLyKULSK5 9v+QOVJdWxo6uxn7C5Y6XpB8orm4Rj16425yOw4atAsHOCjBjXqd6lsmkH+OFDfU0N9H 53PbOOLflKgn0HydF+gMYIAcrAMfVxf7Jn+vmQlInj0hayC7iVdtg5x9+WdXLlq5omxa RkfhfwkxDCSRTlvgLaP7h8nBhc0jhnJEkkaSbta51vzA1jVC12RDvFIAd1hxi0IA5Y4t MPf72Deqe2UKMAUUQS6K8Fo4NkabxXxjczFSE7cCPBOviJsQNwZBFLLNJ+XEYbeVsmrZ QhbQ== X-Gm-Message-State: ALQs6tAzDYYEDhBqq5Zmvlmk/u2pLF0giiVJKqUeuWvIbU3aU+58GRXz 39suNbWLRmHiQGiw66sxeiCcWFj+xTPVw1NH2Oo= X-Received: by 2002:a24:1d94:: with SMTP id 142-v6mr3446856itj.39.1524073540812; Wed, 18 Apr 2018 10:45:40 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:9041:0:0:0:0:0 with HTTP; Wed, 18 Apr 2018 10:45:40 -0700 (PDT) From: Carl Eugen Hoyos Date: Wed, 18 Apr 2018 19:45:40 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavf/dashdec: Do not use memcpy() to copy a struct 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! Attached patch is supposed to fix a warning (and a bug), is this the right and preferred fix? Please comment, Carl Eugen From cf7d2aefc1a3b3a2e9f578ede43906ed6ee96bfd Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Wed, 18 Apr 2018 19:42:57 +0200 Subject: [PATCH] lavf/dashdec: Do not use memcpy() to copy a struct. Fixes a warning: libavformat/dashdec.c:1900:65: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type 'struct fragment *' as the destination; expected 'struct fragment' or an explicit length --- libavformat/dashdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 6304ad9..917fb54 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1897,7 +1897,7 @@ static int init_section_compare_audio(DASHContext *c) static void copy_init_section(struct representation *rep_dest, struct representation *rep_src) { - memcpy(rep_dest->init_section, rep_src->init_section, sizeof(rep_src->init_section)); + rep_dest->init_section = rep_src->init_section; rep_dest->init_sec_buf = av_mallocz(rep_src->init_sec_buf_size); memcpy(rep_dest->init_sec_buf, rep_src->init_sec_buf, rep_src->init_sec_data_len); rep_dest->init_sec_buf_size = rep_src->init_sec_buf_size; -- 1.7.10.4