I have removed the 4-byte alignment line.
--
Mats Peterson
http://matsp888.no-ip.org/~mats/
>From 6256d18629e70c24260e4cfb1993411ccebfac73 Mon Sep 17 00:00:00 2001
From: Mats Peterson <[email protected]>
Date: Tue, 16 Feb 2016 11:44:50 +0100
Subject: [PATCH 2/2] lavc/rawdec: Retrieve nut palette from packets
---
libavcodec/rawdec.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 10bca05..eb9fe48 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -365,7 +365,6 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE,
NULL);
-
if (pal) {
av_buffer_unref(&context->palette);
context->palette = av_buffer_alloc(AVPALETTE_SIZE);
@@ -375,6 +374,13 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
}
memcpy(context->palette->data, pal, AVPALETTE_SIZE);
frame->palette_has_changed = 1;
+ } else if (context->is_nut_pal8) {
+ int vid_size = avctx->width * avctx->height;
+ if (avpkt->size - vid_size) {
+ pal = avpkt->data + vid_size;
+ memcpy(context->palette->data, pal, avpkt->size - vid_size);
+ frame->palette_has_changed = 1;
+ }
}
}
--
1.7.10.4
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel