From patchwork Fri Sep 4 11:03:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 22089 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id C7DB144940C for ; Fri, 4 Sep 2020 14:04:36 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AEB4868B01D; Fri, 4 Sep 2020 14:04:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2CC52689F05 for ; Fri, 4 Sep 2020 14:04:30 +0300 (EEST) Received: by mail-wm1-f65.google.com with SMTP id a65so5666974wme.5 for ; Fri, 04 Sep 2020 04:04:30 -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 :mime-version:content-transfer-encoding; bh=BrEh3oq29IlLXGGsVXAtAGDAiIfcxNzpJ1Oyh9YUnNU=; b=he1TipTy5QVZtTVOSa3ZSM6Pze6QZrc3yqFEQrYxPWb9Ixvku3PPtsi9AB3xqHU7QL LTO3l/K2h7UiNtgEnzkr6Ed1027BhAKv8tH8jg+ShxlmfbLoxVHs9hXQfISj1H5ydLFK xa24wqx8xoakkcKbvM2zTpLJuHKIE18ycCXaIwKIzQbytthen1nVgYcRWxt2CbSl/Wol ZS1h/u5k8sQcrLeqUZF36WivJA5Ii53xlPkj/wwZL6eqOgEzSypY8+Vf++z2RypOKFaa jQx/WE3I77QrvjZXeaDOy00uBu4kbgLWIn25QvAZoh0QuFhREl2Ub4ibzgcbKyhHdbX+ 6HEQ== 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:mime-version:content-transfer-encoding; bh=BrEh3oq29IlLXGGsVXAtAGDAiIfcxNzpJ1Oyh9YUnNU=; b=tzKVt692YBz2EjoKIGbq2IQnBqHDiYxdvbNtXGKQV3UauJwlD7M+5vC1S/XqIl3njM 9d6UMAjGbnEwRaDZC1BySmzBzQjWjK2b1b/LUfc1YyGRKsQwS39dBnnREhSCeuuPZRIg 7GPNdMN1QC9DS9hsu9GR3upf3Xc+cETv0tCrl+FjzzzC5hnma32DtuRDRy/JAnI8BB+R LMa/hV8tt3a5kCDuzYiHEoFfFQTPlFcJKld/WdIOm9eyzLyT0BvCPpD3Wa2Czvmmyhjz 8OU2wl55Z3FaKhZ/kNhM75p+rVmXPIhHSqh1NgZm3I1n0wWPEMPNvbuWm1qu8WAG1f+S kxqQ== X-Gm-Message-State: AOAM530LG0pyI+pzLxGxYtiHRbuszX/14UMrw/ap/s0aE72Z/vd5bNAX 1/RiiEJZSX4wWVWNfrqTKeDH4bu9QhE= X-Google-Smtp-Source: ABdhPJwVHnM8R1gLKbYS/RRXdS9i1K8vK5GKcggv6SChPR939MqPUFEKtyf0kvy7ThWckaAyh7v1Dw== X-Received: by 2002:a7b:c768:: with SMTP id x8mr7552348wmk.189.1599217469398; Fri, 04 Sep 2020 04:04:29 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1fb0f.dynamic.kabel-deutschland.de. [188.193.251.15]) by smtp.gmail.com with ESMTPSA id n4sm10404643wrp.61.2020.09.04.04.04.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 04:04:28 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 4 Sep 2020 13:03:54 +0200 Message-Id: <20200904110354.10100-2-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200904110354.10100-1-andreas.rheinhardt@gmail.com> References: <20200904110354.10100-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] avformat/yuv4mpegenc: Add const where appropriate 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavformat/yuv4mpegenc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/yuv4mpegenc.c b/libavformat/yuv4mpegenc.c index fdd020e13b..6b53780ba0 100644 --- a/libavformat/yuv4mpegenc.c +++ b/libavformat/yuv4mpegenc.c @@ -184,12 +184,10 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt) { AVStream *st = s->streams[pkt->stream_index]; AVIOContext *pb = s->pb; - AVFrame *frame; + const AVFrame *frame = (const AVFrame *)pkt->data; int width, height, h_chroma_shift, v_chroma_shift; int i; - uint8_t *ptr, *ptr1, *ptr2; - - frame = (AVFrame *)pkt->data; + const uint8_t *ptr, *ptr1, *ptr2; /* construct frame header */