aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2016-01-19 16:09:52 -0500
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-01-21 15:33:19 -0500
commitd43a165bda0eae95f4c7a168c7d13d94966c1a09 (patch)
treee37d7ad940c26cde2abad49eb6da63be107d98e0
parentf7168d7016f7d1034ec90223fa91a90711704e11 (diff)
downloadffmpeg-d43a165bda0eae95f4c7a168c7d13d94966c1a09.tar.gz
imgconvert: Add the proper API guards to a deprecated function
-rw-r--r--libavcodec/imgconvert.c2
-rw-r--r--libavcodec/version.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 6528c96779..4667a4fb52 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -33,12 +33,14 @@
#include "libavutil/internal.h"
#include "libavutil/imgutils.h"
+#if FF_API_GETCHROMA
void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
*h_shift = desc->log2_chroma_w;
*v_shift = desc->log2_chroma_h;
}
+#endif
static int is_gray(const AVPixFmtDescriptor *desc)
{
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 303c112046..75d99bc441 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -48,6 +48,9 @@
* the public API and may change, break or disappear at any time.
*/
+#ifndef FF_API_GETCHROMA
+#define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 58)
+#endif
#ifndef FF_API_MISSING_SAMPLE
#define FF_API_MISSING_SAMPLE (LIBAVCODEC_VERSION_MAJOR < 58)
#endif