diff options
author | Reino17 <rwijnsma@xs4all.nl> | 2017-06-23 23:49:31 +0200 |
---|---|---|
committer | Michael Bradshaw <mjbshaw@google.com> | 2017-06-23 20:29:23 -0700 |
commit | 078322f33ced4b2db6ac3e5002f98233d6fbf643 (patch) | |
tree | c8e9510a687b1453fb5daf81726ab8d9e7d76762 /libavcodec/libopenjpegdec.c | |
parent | a579dbb4f7deee142d1bb6545a169c9fcaa467af (diff) | |
download | ffmpeg-078322f33ced4b2db6ac3e5002f98233d6fbf643.tar.gz |
Add support for LibOpenJPEG v2.2/git
Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
Diffstat (limited to 'libavcodec/libopenjpegdec.c')
-rw-r--r-- | libavcodec/libopenjpegdec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c index ce4e2b098a..1210123265 100644 --- a/libavcodec/libopenjpegdec.c +++ b/libavcodec/libopenjpegdec.c @@ -34,7 +34,9 @@ #include "internal.h" #include "thread.h" -#if HAVE_OPENJPEG_2_1_OPENJPEG_H +#if HAVE_OPENJPEG_2_2_OPENJPEG_H +# include <openjpeg-2.2/openjpeg.h> +#elif HAVE_OPENJPEG_2_1_OPENJPEG_H # include <openjpeg-2.1/openjpeg.h> #elif HAVE_OPENJPEG_2_0_OPENJPEG_H # include <openjpeg-2.0/openjpeg.h> @@ -44,7 +46,7 @@ # include <openjpeg.h> #endif -#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H +#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H # define OPENJPEG_MAJOR_VERSION 2 # define OPJ(x) OPJ_##x #else @@ -429,7 +431,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, opj_stream_set_read_function(stream, stream_read); opj_stream_set_skip_function(stream, stream_skip); opj_stream_set_seek_function(stream, stream_seek); -#if HAVE_OPENJPEG_2_1_OPENJPEG_H +#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H opj_stream_set_user_data(stream, &reader, NULL); #elif HAVE_OPENJPEG_2_0_OPENJPEG_H opj_stream_set_user_data(stream, &reader); |