From patchwork Wed Mar 29 14:12:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ronald S. Bultje" X-Patchwork-Id: 3172 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.44.195 with SMTP id s186csp1111197vss; Wed, 29 Mar 2017 07:12:37 -0700 (PDT) X-Received: by 10.223.133.35 with SMTP id 32mr636613wrh.129.1490796757419; Wed, 29 Mar 2017 07:12:37 -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 q25si6461368wra.271.2017.03.29.07.12.36; Wed, 29 Mar 2017 07:12:37 -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 7518E689AA1; Wed, 29 Mar 2017 17:12:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt0-f195.google.com (mail-qt0-f195.google.com [209.85.216.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 46208689A4A for ; Wed, 29 Mar 2017 17:12:05 +0300 (EEST) Received: by mail-qt0-f195.google.com with SMTP id n37so2135232qtb.3 for ; Wed, 29 Mar 2017 07:12:28 -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; bh=W48rMV5yJb5BlUvdKJ4qC6oNebWrv9tsVjx5RyE1I5U=; b=rSkLhImkMyfQPJ4KzEqJ7uncQDiLjy65KPMBRR9QrwbsZ50kB4sNCan6FSZkVuT5Ou SjVvHETakLUrnwZ/bZzQi34wYkU8pZuQbkVfheVfUGk+PvpJu28qeurgNXmgae4nphMT W3PNU1H1Zp/3vOm3hYXDYemo2MAeHT85BH5wWXGDryAOxczVuBdF8CFzbXFzyYsYnz5T 8WONyJYLehGR4/JEocEeT/XgFZSCjzU8UCBFSPWgsdiLjz67ODguE2V3BnirzJeHpcpy rnJEWmAoS8Tincys/HsCIgUwZfPIJ3ptVa5uiBXeBuw9+jSZzx3conTEB3il/0ELagjT PVmA== 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; bh=W48rMV5yJb5BlUvdKJ4qC6oNebWrv9tsVjx5RyE1I5U=; b=c8WGuEMmh1umcFXVB9tqEI64ggUTQ+HuS7/x3CDaC45MJKRbJQEan5+pjk0agvE4Se NONXUHP2ccOmB7S3nbcrv7RS2cqhnyLGTO4c8wJXQGUt+5evJqt+HM0X83lC0HBggUrX c5RGhuXZw3sbALwD9G5Yh3Jue97GbYz3fj0qZgPyCFCScIbHzuB6S7E09WSeOfNXtRYO jGiVbVOXrGoFMOV9tZkFIKfnvupG91QCgvFP0VnJzA2U9OUcc7mzKZoHkNXPDo48vOEy 9J2PxxvDwVz2MmBDig5cxYknvtPPauGDffTXte45ZJlrFoSfpc/LswL1cTGfNXbYcyKp BIdg== X-Gm-Message-State: AFeK/H1m+GSYwUl3GKu0V/rnZFK6l67tB0Lu9Eourlso3imK3p9jO8VnjuTqK5l9fvtyFg== X-Received: by 10.200.50.92 with SMTP id y28mr821897qta.289.1490796746602; Wed, 29 Mar 2017 07:12:26 -0700 (PDT) Received: from localhost.localdomain ([65.206.95.146]) by smtp.gmail.com with ESMTPSA id u63sm4976197qkh.45.2017.03.29.07.12.25 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 29 Mar 2017 07:12:26 -0700 (PDT) From: "Ronald S. Bultje" To: ffmpeg-devel@ffmpeg.org Date: Wed, 29 Mar 2017 10:12:19 -0400 Message-Id: <1490796744-76454-1-git-send-email-rsbultje@gmail.com> X-Mailer: git-send-email 2.8.1 Subject: [FFmpeg-devel] [PATCH 1/6] h264: don't write to source picture object in ff_h264_ref_picture(). 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: "Ronald S. Bultje" MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Doing so is analogous to writing to source data in memcpy(), and causes (harmless) tsan warnings in fate-h264. --- libavcodec/h264_picture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c index f634d2a..db96737 100644 --- a/libavcodec/h264_picture.c +++ b/libavcodec/h264_picture.c @@ -70,8 +70,8 @@ int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src) av_assert0(!dst->f->buf[0]); av_assert0(src->f->buf[0]); + av_assert0(src->tf.f == src->f); - src->tf.f = src->f; dst->tf.f = dst->f; ret = ff_thread_ref_frame(&dst->tf, &src->tf); if (ret < 0)