Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/sanm: handle xpal cmd 0 (PR #20300)
@ 2025-08-21  7:46 Manuel Lauss via ffmpeg-devel
  0 siblings, 0 replies; only message in thread
From: Manuel Lauss via ffmpeg-devel @ 2025-08-21  7:46 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Manuel Lauss

PR #20300 opened by Manuel Lauss (mlauss2)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20300
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20300.patch

It's like cmd 2. Fixes the Rebel Assault 1 Intro Video "C1BLOCK.ANM"
crossfade from planet view to space view and subsequent wrong colors.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>


From 4012c92c9b05b26df88c31f1497033a81ea73025 Mon Sep 17 00:00:00 2001
From: Manuel Lauss <manuel.lauss@gmail.com>
Date: Thu, 21 Aug 2025 09:44:25 +0200
Subject: [PATCH] avcodec/sanm: handle xpal cmd 0

It's like cmd 2. Fixes the Rebel Assault 1 Intro Video "C1BLOCK.ANM"
crossfade from planet view to space view and subsequent wrong colors.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
---
 libavcodec/sanm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c
index e4308af647..4cf1ac5221 100644
--- a/libavcodec/sanm.c
+++ b/libavcodec/sanm.c
@@ -1888,7 +1888,7 @@ static int process_xpal(SANMVideoContext *ctx, int size)
             }
             *pal++ = 0xFFU << 24 | c[0] << 16 | c[1] << 8 | c[2];
         }
-    } else if (cmd == 2) {
+    } else if (cmd == 0 || cmd == 2) {
         if (size < PALETTE_DELTA * 2 + 4) {
             av_log(ctx->avctx, AV_LOG_ERROR,
                    "Incorrect palette change block size %"PRIu32".\n", size);
-- 
2.49.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".

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-21  7:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-21  7:46 [FFmpeg-devel] [PATCH] avcodec/sanm: handle xpal cmd 0 (PR #20300) Manuel Lauss via ffmpeg-devel

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git