summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2018-05-23 13:46:25 -0700
committerKhem Raj <raj.khem@gmail.com>2018-05-26 21:10:55 -0700
commita44e42081db77c6cfd039cb8ea2be39399c6f4a3 (patch)
tree670e1b688ec8d3061cfc93537548d4a1508762e5
parent9f38fa5ae1df01673ad652f6bc92fffe78148ee4 (diff)
downloadmeta-openembedded-a44e42081db77c6cfd039cb8ea2be39399c6f4a3.tar.gz
opencv: Work around deprecated ffmpeg functions
The ffmpeg no longer makes use of the AVFMT_RAWPICTURE format, but opencv still has code in it for dealing with this type of exported format. For now it is easier to work around it and allow the code to compile and it will just not get used. A future version of OpenCV will remove the AVFMT_RAWPICTURE handler. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch33
-rw-r--r--meta-oe/recipes-support/opencv/opencv_3.3.bb1
2 files changed, 34 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch b/meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch
new file mode 100644
index 0000000000..63cb7f943a
--- /dev/null
+++ b/meta-oe/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch
@@ -0,0 +1,33 @@
1From 7d31f41d2a6759e244983504ce855fc32916b97a Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Wed, 9 May 2018 13:33:59 -0700
4Subject: [PATCH] Temporarliy work around deprecated ffmpeg RAW function
5 compile failure until next uprev
6
7Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
8---
9 modules/videoio/src/cap_ffmpeg_impl.hpp | 8 ++++++++
10 1 file changed, 8 insertions(+)
11
12diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp
13index 5a9b10f075..97c6b74b07 100644
14--- a/modules/videoio/src/cap_ffmpeg_impl.hpp
15+++ b/modules/videoio/src/cap_ffmpeg_impl.hpp
16@@ -667,6 +667,14 @@ struct ImplMutex::Impl
17
18 #endif
19
20+/* NOTE This is deprecated in ffmpeg and the code should be removed */
21+#ifndef AVFMT_RAWPICTURE
22+#define AVFMT_RAWPICTURE 0x0020
23+#endif /* AVFMT_RAWPICTURE */
24+#ifndef CODEC_FLAG_GLOBAL_HEADER
25+#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
26+#endif
27+
28 void ImplMutex::init()
29 {
30 impl = new Impl();
31--
322.11.0
33
diff --git a/meta-oe/recipes-support/opencv/opencv_3.3.bb b/meta-oe/recipes-support/opencv/opencv_3.3.bb
index ca62de7c8f..b697f44d1e 100644
--- a/meta-oe/recipes-support/opencv/opencv_3.3.bb
+++ b/meta-oe/recipes-support/opencv/opencv_3.3.bb
@@ -60,6 +60,7 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \
60 file://javagen.patch \ 60 file://javagen.patch \
61 file://protobuf.patch \ 61 file://protobuf.patch \
62 file://already-exists.patch \ 62 file://already-exists.patch \
63 file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \
63" 64"
64PV = "3.3+git${SRCPV}" 65PV = "3.3+git${SRCPV}"
65 66