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 79F93458CB for ; Sat, 22 Jun 2024 03:00:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8A50368D79F; Sat, 22 Jun 2024 06:00:13 +0300 (EEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E564168D6A7 for ; Sat, 22 Jun 2024 06:00:06 +0300 (EEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-70436ac8882so2163310b3a.2 for ; Fri, 21 Jun 2024 20:00:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719025204; x=1719630004; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=l67hT/5zUzPy87UImTiPB9M3Y/l0EQgISl0PO4Qn2jc=; b=SXu5s6lnNDXckebvyWJL3SGfDTGcoTomLlWPDeaMqsZv8H5/Nj84dfLeC64qCJk+5l 1g2+ZonMr1K5DNj0d5sOtTmPuMgrjsVCTbHGRr6CkAQ+jEeBqslmvxh5fva5yOM0m17z YjzcONRTWkkBHlw1DIcemxC+rc0N7mfib+Ocq7qiKFg/1RlpJG8t/igtn8x8w+Qk/MH9 3/lj2lPhbWTdo8jsoQ2RygUC8rMN075cjc4/galPiVKgsHi/qFTgeod4jtIvDylDXUI2 HE++z/VWvCbuhcIIciBnGKWRDsP2jM3i4qr7jr7vwzGFL2Ua5VKJWKyyiRJeKssZy9zD MP/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719025204; x=1719630004; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l67hT/5zUzPy87UImTiPB9M3Y/l0EQgISl0PO4Qn2jc=; b=Bm5czFGhTqDJt3SJMJbftKhf9K8+/qBTlYM1LiJDZbE/7aEKA/ryo8DVoG2TNtgIpv F7KkUiXCT+E770ptlZO058MhyhrArX8bQWus3yDQTaxtuncd73ffD8cMBj2j0ax4Ajja kicbJ2hPE7eIrtLSVGNnE1jn3xkM+0C0fA18idrkEmdju050I+C3+snjx5H2f2i+s3JZ m2uj0xncP8yW2Hv5MGTQvcipsGvCyR2mwNIFLdVloTLEgMBkFGTsuPmjHAQinh+tluTA z1cQQKU+3dW+KVqRKN8wzmNRobMxIWOWB/WhKTMqtfX3fnU6n4DEC4IdLMApcCIZ7U/f ow5A== X-Gm-Message-State: AOJu0Yw7kFgJM7Al6Mp0Rlf0qJUY470Ux7t+cxX1SyrKbCEfJO4Unb3N VdFAhQBchDBbAlO4hLEuYKmbpxEmWSENdw3RhTGdeEfoW+xPrUse9yu4jw== X-Google-Smtp-Source: AGHT+IGVGW9DNBIPvbI5KzcSO0cyRpS8TQqjxLTJP0Gj7gU1rgiSD/w4GWWYJJObGFRtFNESgc1y5g== X-Received: by 2002:aa7:8206:0:b0:704:3678:3f03 with SMTP id d2e1a72fcca58-70629c15227mr9521509b3a.5.1719025203932; Fri, 21 Jun 2024 20:00:03 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7065124dd03sm2132236b3a.113.2024.06.21.20.00.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jun 2024 20:00:03 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Jun 2024 23:59:52 -0300 Message-ID: <20240622025953.7951-3-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240622025953.7951-1-jamrial@gmail.com> References: <20240622012531.5523-1-jamrial@gmail.com> <20240622025953.7951-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/7] avformat/mov: don't use sizeof(AVStereo3D) 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 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: It's not part of the libavutil ABI. Signed-off-by: James Almer --- libavformat/isom.h | 1 + libavformat/mov.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/libavformat/isom.h b/libavformat/isom.h index 35b767a52c..a0498f45e5 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -247,6 +247,7 @@ typedef struct MOVStreamContext { int32_t *display_matrix; AVStereo3D *stereo3d; + size_t stereo3d_size; AVSphericalMapping *spherical; size_t spherical_size; AVMasteringDisplayMetadata *mastering; diff --git a/libavformat/mov.c b/libavformat/mov.c index 9b2ce1f167..07c0ec3ec4 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -6332,7 +6332,7 @@ static int mov_read_st3d(MOVContext *c, AVIOContext *pb, MOVAtom atom) return 0; } - sc->stereo3d = av_stereo3d_alloc(); + sc->stereo3d = av_stereo3d_alloc_size(&sc->stereo3d_size); if (!sc->stereo3d) return AVERROR(ENOMEM); @@ -6695,7 +6695,7 @@ static int mov_read_eyes(MOVContext *c, AVIOContext *pb, MOVAtom atom) } if (!sc->stereo3d) { - sc->stereo3d = av_stereo3d_alloc(); + sc->stereo3d = av_stereo3d_alloc_size(&sc->stereo3d_size); if (!sc->stereo3d) return AVERROR(ENOMEM); } @@ -6782,7 +6782,7 @@ static int mov_read_hfov(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (!sc->stereo3d) { - sc->stereo3d = av_stereo3d_alloc(); + sc->stereo3d = av_stereo3d_alloc_size(&sc->stereo3d_size); if (!sc->stereo3d) return AVERROR(ENOMEM); } @@ -6831,7 +6831,7 @@ static int mov_parse_uuid_spherical(MOVStreamContext *sc, AVIOContext *pb, size_ else mode = AV_STEREO3D_2D; - sc->stereo3d = av_stereo3d_alloc(); + sc->stereo3d = av_stereo3d_alloc_size(&sc->stereo3d_size); if (!sc->stereo3d) goto out; @@ -10032,7 +10032,7 @@ static int mov_read_header(AVFormatContext *s) if (sc->stereo3d) { if (!av_packet_side_data_add(&st->codecpar->coded_side_data, &st->codecpar->nb_coded_side_data, AV_PKT_DATA_STEREO3D, - (uint8_t *)sc->stereo3d, sizeof(*sc->stereo3d), 0)) + (uint8_t *)sc->stereo3d, sc->stereo3d_size, 0)) return AVERROR(ENOMEM); sc->stereo3d = NULL; -- 2.45.2 _______________________________________________ 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".