aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-27 20:06:01 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-27 20:06:01 +0000
commite15e108885344b5cf8520a553ad93b742a95b6d3 (patch)
treeb70ed8f56f846a01150ecaef8e629ad994a49f7a /libavcodec
parentfa6c7ccc20d3dc8f220af31f10a159e1b7a13b92 (diff)
parentd43a165bda0eae95f4c7a168c7d13d94966c1a09 (diff)
downloadffmpeg-e15e108885344b5cf8520a553ad93b742a95b6d3.tar.gz
Merge commit 'd43a165bda0eae95f4c7a168c7d13d94966c1a09'
* commit 'd43a165bda0eae95f4c7a168c7d13d94966c1a09': imgconvert: Add the proper API guards to a deprecated function Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/imgconvert.c2
-rw-r--r--libavcodec/version.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index e9178843b6..0035dc6e1c 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -34,6 +34,7 @@
#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);
@@ -41,6 +42,7 @@ void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int
*h_shift = desc->log2_chroma_w;
*v_shift = desc->log2_chroma_h;
}
+#endif
int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
enum AVPixelFormat src_pix_fmt,
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 2dc83ba87c..61b3c545ca 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -60,6 +60,8 @@
#endif
#ifndef FF_API_AVCODEC_RESAMPLE
#define FF_API_AVCODEC_RESAMPLE FF_API_AUDIO_CONVERT
+#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)