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/kmvc.c | |
parent | 01d9a84ef58c2d0d89958b18420483b058ac9dd1 (diff) | |
download | ffmpeg-63767b79a570404628b2521b83104108b7b6884c.tar.gz |
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/kmvc.c')
-rw-r--r-- | libavcodec/kmvc.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c index de01f6b75b..83aba4b252 100644 --- a/libavcodec/kmvc.c +++ b/libavcodec/kmvc.c @@ -273,7 +273,14 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - frame->palette_has_changed = ff_copy_palette(ctx->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS + frame->palette_has_changed = +#endif + ff_copy_palette(ctx->pal, avpkt, avctx); +#if FF_API_PALETTE_HAS_CHANGED +FF_ENABLE_DEPRECATION_WARNINGS +#endif header = bytestream2_get_byte(&ctx->g); @@ -296,7 +303,11 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, } if (header & KMVC_PALETTE) { +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif // palette starts from index 1 and has 127 entries for (i = 1; i <= ctx->palsize; i++) { ctx->pal[i] = 0xFFU << 24 | bytestream2_get_be24(&ctx->g); @@ -305,7 +316,11 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame, if (ctx->setpal) { ctx->setpal = 0; +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } /* make the palette available on the way out */ |