]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/interplayvideo.c
avcodec/ituh263enc: Make static initializations thread-safe
[ffmpeg] / libavcodec / interplayvideo.c
index 58400b6acee471cce134359a7334e7b1c2c8c4fc..388fe2665e755a8048cbc48951d780102aafc562 100644 (file)
@@ -43,6 +43,7 @@
 #define BITSTREAM_READER_LE
 #include "avcodec.h"
 #include "bytestream.h"
+#include "decode.h"
 #include "get_bits.h"
 #include "hpeldsp.h"
 #include "internal.h"
@@ -1317,14 +1318,7 @@ static int ipvideo_decode_frame(AVCodecContext *avctx,
         return ret;
 
     if (!s->is_16bpp) {
-        int size;
-        const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size);
-        if (pal && size == AVPALETTE_SIZE) {
-            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);
-        }
+        frame->palette_has_changed = ff_copy_palette(s->pal, avpkt, avctx);
     }
 
     switch (frame_format) {