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 2CD78411CA for ; Tue, 15 Feb 2022 13:06:27 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 42AB568B1BA; Tue, 15 Feb 2022 15:06:25 +0200 (EET) Received: from vie01a-dmta-pe02-1.mx.upcmail.net (vie01a-dmta-pe02-1.mx.upcmail.net [62.179.121.157]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D02AB68B0E7 for ; Tue, 15 Feb 2022 15:06:18 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe02.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1nJxX8-00AD56-0I for ffmpeg-devel@ffmpeg.org; Tue, 15 Feb 2022 14:06:18 +0100 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id JxWAnfWAYSgGFJxWAnBlFj; Tue, 15 Feb 2022 14:05:18 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=f8Q2+96M c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=tCo885CNdfwX9T4dXkgA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 15 Feb 2022 14:05:17 +0100 Message-Id: <20220215130517.25172-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4wfAlKqrJuxgFOD+OC4bgdd67rMV5gb6fSrR8LKRFd5+QjI+VKBGizm0VxpLQPW9QDVx0lXLtSe2UcivbfsdSALNjhSzcSyrUrI85JISP+h8AbfMrW7mlI FGxqU+0mwPntjWPr59tkD5MSlm1fuuqnqkj/9AIJTmVeZKmg+Ifj6Cnr Subject: [FFmpeg-devel] [PATCH] avformat/argo_cvg: Fix checksum 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 MIME-Version: 1.0 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: Signed-off-by: Michael Niedermayer --- libavformat/argo_cvg.c | 15 +++++---------- libavformat/version.h | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/libavformat/argo_cvg.c b/libavformat/argo_cvg.c index c5da32536d..dfdf126c17 100644 --- a/libavformat/argo_cvg.c +++ b/libavformat/argo_cvg.c @@ -335,19 +335,14 @@ static int argo_cvg_write_trailer(AVFormatContext *s) ArgoCVGMuxContext *ctx = s->priv_data; int64_t ret; + ctx->checksum += (ctx->size & 255) + + ((ctx->size>> 8) & 255) + + ((ctx->size>>16) & 255) + + (ctx->size>>24); + av_log(s, AV_LOG_TRACE, "size = %zu\n", ctx->size); av_log(s, AV_LOG_TRACE, "checksum = %u\n", ctx->checksum); - /* - * NB: This is wrong. We're always slightly under the original. - * Verified by remuxing. For reference (orig - remuxed): - * - TCLD.CVG: 4706074 - 4705696 = 378 - * - DANLOOP1.CVG: 5684641 - 5684212 = 429 - * - CRYS.CVG: 2495499 - 2495367 = 132 - * - PICKUP88.CVG: 1348091 - 1347937 = 154 - * - SELECT1.CVG: 549987 - 549752 = 235 - * Also NB: it doesn't matter, the game doesn't check them. - */ avio_wl32(s->pb, ctx->checksum); if ((ret = avio_seek(s->pb, 0, SEEK_SET)) < 0) diff --git a/libavformat/version.h b/libavformat/version.h index 5439dad170..26234573b8 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -33,7 +33,7 @@ // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 59 #define LIBAVFORMAT_VERSION_MINOR 17 -#define LIBAVFORMAT_VERSION_MICRO 101 +#define LIBAVFORMAT_VERSION_MICRO 102 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ -- 2.17.1 _______________________________________________ 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".