diff options
Diffstat (limited to 'libavcodec/msvideo1.c')
-rw-r--r-- | libavcodec/msvideo1.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c index b4b5ea4666..cfd51cfd67 100644 --- a/libavcodec/msvideo1.c +++ b/libavcodec/msvideo1.c @@ -33,6 +33,7 @@ #include "libavutil/internal.h" #include "libavutil/intreadwrite.h" #include "avcodec.h" +#include "decode.h" #include "internal.h" #define PALETTE_COUNT 256 @@ -314,15 +315,7 @@ static int msvideo1_decode_frame(AVCodecContext *avctx, return ret; if (s->mode_8bit) { - buffer_size_t size; - const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size); - - if (pal && size == AVPALETTE_SIZE) { - memcpy(s->pal, pal, AVPALETTE_SIZE); - s->frame->palette_has_changed = 1; - } 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 (s->mode_8bit) |