diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-08-06 09:36:45 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-08-06 09:36:45 +0000 |
commit | bf176f58b79e9bbbcc0eb243d39fda3f2419992c (patch) | |
tree | bc160c982bebab7a533b4deababe8e3c8648e54a /libavcore/imgutils.h | |
parent | 85fbad4555448c27e9b40b44663f5bd1dde452d2 (diff) | |
download | ffmpeg-bf176f58b79e9bbbcc0eb243d39fda3f2419992c.tar.gz |
Deprecate avcodec_check_dimensions() in favor of the new function
av_check_image_size() declared in libavcore/imgutils.h.
Originally committed as revision 24709 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcore/imgutils.h')
-rw-r--r-- | libavcore/imgutils.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcore/imgutils.h b/libavcore/imgutils.h index 4a4d6a1521..be6886c38e 100644 --- a/libavcore/imgutils.h +++ b/libavcore/imgutils.h @@ -50,4 +50,16 @@ int av_fill_image_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int widt int av_fill_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height, uint8_t *ptr, const int linesizes[4]); +/** + * Check if the given dimension of an image is valid, meaning that all + * bytes of the image can be addressed with a signed int. + * + * @param w the width of the picture + * @param h the height of the picture + * @param log_offset the offset to sum to the log level for logging with log_ctx + * @param log_ctx the parent logging context, it may be NULL + * @return >= 0 if valid, a negative error code otherwise + */ +int av_check_image_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx); + #endif /* AVCORE_IMGUTILS_H */ |