It would be left empty on each frame whose packet does not come with palette attached.
Unified · Split
| @@ -43,6 +43,8 @@ typedef struct EightBpsContext { · 42 unmodified lines | |||
| 43 | 43 | ||
| 44 | uint8_t planes; | 44 | uint8_t planes; |
| 45 | uint8_t planemap[4]; | 45 | uint8_t planemap[4]; |
| 46 | |||
| 47 | uint32_t pal[256]; | ||
| 46 | } EightBpsContext; | 48 | } EightBpsContext; |
| 47 | 49 | ||
| 48 | static int decode_frame(AVCodecContext *avctx, AVFrame *frame, | 50 | static int decode_frame(AVCodecContext *avctx, AVFrame *frame, |
| @@ -116,10 +118,12 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, · 67 unmodified lines | |||
| 116 | FF_DISABLE_DEPRECATION_WARNINGS | 118 | FF_DISABLE_DEPRECATION_WARNINGS |
| 117 | frame->palette_has_changed = | 119 | frame->palette_has_changed = |
| 118 | #endif | 120 | #endif |
| 119 | ff_copy_palette(frame->data[1], avpkt, avctx); | 121 | ff_copy_palette(c->pal, avpkt, avctx); |
| 120 | #if FF_API_PALETTE_HAS_CHANGED | 122 | #if FF_API_PALETTE_HAS_CHANGED |
| 121 | FF_ENABLE_DEPRECATION_WARNINGS | 123 | FF_ENABLE_DEPRECATION_WARNINGS |
| 122 | #endif | 124 | #endif |
| 125 | |||
| 126 | memcpy(frame->data[1], c->pal, AVPALETTE_SIZE); | ||
| 123 | } | 127 | } |
| 124 | 128 | ||
| 125 | *got_frame = 1; | 129 | *got_frame = 1; |