1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2026-06-19 19:03:00 +02:00

avcodec/decode: Better documentation for ff_set_dimensions()

Clarify what is checked and that it avoids explicit generic overflow checks

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9572ab7f45)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2026-04-16 13:57:21 +02:00
parent 0dd168e8fd
commit a1167807fc
+7 -3
View File
@@ -93,9 +93,13 @@ int ff_attach_decode_data(AVFrame *frame);
*/
int ff_copy_palette(void *dst, const AVPacket *src, void *logctx);
/**
* Check that the provided frame dimensions are valid and set them on the codec
* context.
/*
* Validate and set video frame dimensions on AVCodecContext.
*
* Dimensions accepted here satisfy FFmpeg's generic image-size validation
* (see av_image_check_size2()). Decoder code normally should not duplicate
* generic width/height overflow checks before ff_get_buffer(); add local
* checks only for codec-specific derived sizes or complexity bounds.
*/
int ff_set_dimensions(AVCodecContext *s, int width, int height);