From 9e500efdbe0deeff1602500ebc229a0a6b6bb1a2 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Mon, 28 Apr 2014 16:08:33 -0400 Subject: Add av_image_check_sar() and use it to validate SAR --- libavcodec/internal.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libavcodec/internal.h') diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 6aaaf4c2cb..3b2ae40ca4 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -176,6 +176,12 @@ const uint8_t *avpriv_find_start_code(const uint8_t *restrict p, */ int ff_set_dimensions(AVCodecContext *s, int width, int height); +/** + * Check that the provided sample aspect ratio is valid and set it on the codec + * context. + */ +int ff_set_sar(AVCodecContext *avctx, AVRational sar); + /** * Add or update AV_FRAME_DATA_MATRIXENCODING side data. */ -- cgit v1.2.3