You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-16 22:42:38 +02:00
lavc/8bps: fix exporting palette after 63767b79a5
It would be left empty on each frame whose packet does not come with palette attached.
This commit is contained in:
@ -43,6 +43,8 @@ typedef struct EightBpsContext {
|
|||||||
|
|
||||||
uint8_t planes;
|
uint8_t planes;
|
||||||
uint8_t planemap[4];
|
uint8_t planemap[4];
|
||||||
|
|
||||||
|
uint32_t pal[256];
|
||||||
} EightBpsContext;
|
} EightBpsContext;
|
||||||
|
|
||||||
static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||||
@ -116,10 +118,12 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
|||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
frame->palette_has_changed =
|
frame->palette_has_changed =
|
||||||
#endif
|
#endif
|
||||||
ff_copy_palette(frame->data[1], avpkt, avctx);
|
ff_copy_palette(c->pal, avpkt, avctx);
|
||||||
#if FF_API_PALETTE_HAS_CHANGED
|
#if FF_API_PALETTE_HAS_CHANGED
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
*got_frame = 1;
|
*got_frame = 1;
|
||||||
|
Reference in New Issue
Block a user