diff options
author | James Almer <jamrial@gmail.com> | 2023-05-17 22:39:57 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2023-05-18 08:45:23 -0300 |
commit | 63767b79a570404628b2521b83104108b7b6884c (patch) | |
tree | ba05301188d4deb51854721e0e60bfca4edb0323 /libavcodec/8bps.c | |
parent | 01d9a84ef58c2d0d89958b18420483b058ac9dd1 (diff) |
avutil/frame: deprecate palette_has_changed
Not only this is information that relies on the concept of a sequence of
frames, which is completely out of place as a field in AVFrame, but there are
no known or intended uses of this field.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/8bps.c')
-rw-r--r-- | libavcodec/8bps.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c index 90d6c96fd1..af98f62fad 100644 --- a/libavcodec/8bps.c +++ b/libavcodec/8bps.c @@ -47,8 +47,6 @@ typedef struct EightBpsContext { unsigned char planes; unsigned char planemap[4]; - - uint32_t pal[256]; } EightBpsContext; static int decode_frame(AVCodecContext *avctx, AVFrame *frame, @@ -123,9 +121,14 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } if (avctx->bits_per_coded_sample <= 8) { - frame->palette_has_changed = ff_copy_palette(c->pal, avpkt, avctx); - - memcpy (frame->data[1], c->pal, AVPALETTE_SIZE); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(frame->data[1], avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif } *got_frame = 1; |