aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cinepak.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/cinepak.c')
-rw-r--r--libavcodec/cinepak.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index d70cb4b694..ccd6af3208 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -40,6 +40,7 @@
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "decode.h"
#include "internal.h"
@@ -477,14 +478,7 @@ static int cinepak_decode_frame(AVCodecContext *avctx,
return ret;
if (s->palette_video) {
- buffer_size_t size;
- const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size);
- if (pal && size == AVPALETTE_SIZE) {
- s->frame->palette_has_changed = 1;
- memcpy(s->pal, pal, AVPALETTE_SIZE);
- } else if (pal) {
- av_log(avctx, AV_LOG_ERROR, "Palette size %d is wrong\n", size);
- }
+ s->frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx);
}
if ((ret = cinepak_decode(s)) < 0) {