summaryrefslogtreecommitdiff
path: root/libavcodec/decode.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-17 22:43:32 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-22 02:43:04 +0100
commit7b100839330ace3b4846ee4a1fc5caf4b8f8a34e (patch)
tree5743c922bd05a372bfbe733cf7ee482153d8e55d /libavcodec/decode.h
parentab5803553b3932da3227647ae27f2e2795cc5752 (diff)
downloadffmpeg-7b100839330ace3b4846ee4a1fc5caf4b8f8a34e.tar.gz
avcodec: Factor updating palette out
Because the properties of frames returned from ff_get/reget_buffer are not reset at all, lots of returned frames had palette_has_changed wrongly set to 1. This has been changed, too. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/decode.h')
-rw-r--r--libavcodec/decode.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/decode.h b/libavcodec/decode.h
index 1467b1eb33..dee2543b1c 100644
--- a/libavcodec/decode.h
+++ b/libavcodec/decode.h
@@ -80,6 +80,15 @@ int ff_decode_get_hw_frames_ctx(AVCodecContext *avctx,
int ff_attach_decode_data(AVFrame *frame);
/**
+ * Check whether the side-data of src contains a palette of
+ * size AVPALETTE_SIZE; if so, copy it to dst and return 1;
+ * else return 0.
+ * Also emit an error message upon encountering a palette
+ * with invalid size.
+ */
+int ff_copy_palette(void *dst, const AVPacket *src, void *logctx);
+
+/**
* Perform decoder initialization and validation.
* Called when opening the decoder, before the AVCodec.init() call.
*/