Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Manuel Lauss via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Manuel Lauss <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] avcodec/sanm: handle xpal cmd 0 (PR #20300)
Date: Thu, 21 Aug 2025 10:46:53 +0300 (EEST)
Message-ID: <20250821074653.D732868D164@ffbox0-bg.ffmpeg.org> (raw)

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".

                 reply	other threads:[~2025-08-21  7:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250821074653.D732868D164@ffbox0-bg.ffmpeg.org \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=code@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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