From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 12B0643736 for ; Wed, 27 Jul 2022 10:24:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5E9C068BA08; Wed, 27 Jul 2022 13:24:47 +0300 (EEST) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 97EC568B9FE for ; Wed, 27 Jul 2022 13:24:40 +0300 (EEST) Received: by mail-ed1-f47.google.com with SMTP id v17so1246208edc.1 for ; Wed, 27 Jul 2022 03:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3IYGQKu0q732l2DCQeIGV0TnNx2rnxy752VRbLqT9RY=; b=N8gRdLvIqsXaAZPdhDgleHNWSiAw+d1OK9F8xUtpEd1vXtT4cDDiGq+qcM9l08gLuj 8GCPJVbZ8D/HSWVbR0uCiyuW3+sdbLHkEg+CDVm4vlY9s72Vhce95CNjXK0v5FV28Y8p Zp0JeS4G+AB0TS6MPgqo29TStad6X0vbscVIp3k3dlpYXpbkGv3o0lqYa2zr6Mp5lw+f C8yv2JrLaLP1JaV+Z6KUgqWDEgBUhQPSUhjITenu8FXLE0G26hok5zaGZcEFA77loSEg mU0PtaiCtNc28b/PrTTbkR3qXVbW/JJdZE/0SdmranfYzSaQyduRPb2+QpxsAHtCMPIK d3MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3IYGQKu0q732l2DCQeIGV0TnNx2rnxy752VRbLqT9RY=; b=c8o4SOqZdwbUrHE16vPNOZ2+ZLxy8eD5wXXnnS4wCjGjHS5swaELZHayrMcYmu1IyR iYEVolFMRUocCXIqyW7VA3yCH3nF9Rh3nRtaMYGESYmUV5WnT3o6ro7squAnXj42+5rN eTzFyNrgpRGGg5uEXu7oHd+c4EMUjxhuyp4O9f5zbit8oQkt2qaRg2B0B+hN6ZxdmJ23 i0YgqsO7evWNzBhLYxeCIw5bf0pYGSraxKONsGg4YkfJdyXCLqczRoDeeRNicgweJybG pkS4/RM+nj41hdvCODkugIgxCmOjrbq1oTTNsaPGgSqa9c8aEyyZ0Waa7guxwuUhhhpH rarg== X-Gm-Message-State: AJIora+BxWrCUIRcZXsnNKR4Dx+/OKyM6MYwRAIXV01rZYD6fbUxC6tV IYMMaEKBuYDPlhS70q10DNY4tG5ByidWbZ6HWYWKGbPc X-Google-Smtp-Source: AGRyM1v89DNxDnbNJhmzQryOo9zz+tC1iqfq7ZSUuT3zpz72ndg26p7l21fr/3zSeZF/KcnL44bd2b8MFJNmKpY62lA= X-Received: by 2002:a05:6402:4504:b0:43b:4ec7:2ec1 with SMTP id ez4-20020a056402450400b0043b4ec72ec1mr22149096edb.7.1658917478921; Wed, 27 Jul 2022 03:24:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Ronald S. Bultje" Date: Wed, 27 Jul 2022 18:24:27 +0800 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH 07/39] avcodec/vp8: Constify slice threads' ptr to main context X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Andreas Rheinhardt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Hi, On Wed, Jul 27, 2022 at 5:31 PM Andreas Rheinhardt < andreas.rheinhardt@outlook.com> wrote: > Modifying the main context from a slice thread is (usually) > a data race, so it must not happen. So only use a pointer to const > to access the main context. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/vp8.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c > index e474fc5de5..d0c26ba00d 100644 > --- a/libavcodec/vp8.c > +++ b/libavcodec/vp8.c > @@ -2582,7 +2582,7 @@ static av_always_inline > int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int > jobnr, > int threadnr, int is_vp7) > { > - VP8Context *s = avctx->priv_data; > + const VP8Context *s = avctx->priv_data; > VP8ThreadData *td = &s->thread_data[jobnr]; > VP8ThreadData *next_td = NULL, *prev_td = NULL; > VP8Frame *curframe = s->curframe; > -- > 2.34.1 > OK. Ronald _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".