Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
ee9c25a3
Commit
ee9c25a3
authored
2 years ago
by
alice
Committed by
Bart Ribbers
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
community/opencv: upgrade to 4.6.0
parent
d8abd518
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!39304
[3.16] main/expat: security upgrade to 2.4.9
,
!35147
community/opencv: upgrade to 4.6.0
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
community/opencv/APKBUILD
+4
-12
4 additions, 12 deletions
community/opencv/APKBUILD
community/opencv/ffmpeg-memory-leak.patch
+0
-70
0 additions, 70 deletions
community/opencv/ffmpeg-memory-leak.patch
community/opencv/ffmpeg5.patch
+0
-1002
0 additions, 1002 deletions
community/opencv/ffmpeg5.patch
with
4 additions
and
1084 deletions
community/opencv/APKBUILD
+
4
−
12
View file @
ee9c25a3
# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname
=
opencv
pkgver
=
4.
5.5
pkgrel
=
3
pkgver
=
4.
6.0
pkgrel
=
0
pkgdesc
=
"An open source computer vision and machine learning library"
url
=
"https://opencv.org/"
# s390x blocked by vtk -> netcdf
...
...
@@ -39,18 +39,12 @@ makedepends="$depends_dev
"
source
=
"https://github.com/opencv/opencv/archive/
$pkgver
/opencv-
$pkgver
.tar.gz
https://github.com/opencv/opencv_contrib/archive/
$pkgver
/opencv_contrib-
$pkgver
.tar.gz
ffmpeg5.patch
ffmpeg-memory-leak.patch
"
# Tests require human interaction
# net required to download a data file (face_landmark_model.dat)
options
=
"net !check"
case
"
$CARCH
"
in
ppc64le
)
# build failure with ENABLE_BUILD_HARDENING
_extra_cmake_flags
=
""
;;
x86_64
)
_extra_cmake_flags
=
"-DENABLE_BUILD_HARDENING=ON -DCPU_BASELINE_DISABLE=SSE3 -DCPU_BASELINE_REQUIRE=SSE2"
;;
...
...
@@ -133,8 +127,6 @@ _py3() {
}
sha512sums
=
"
4d1783fd78425cc43bb2153446dd634cedd366a49592bccc0c538a40aa161fcf67db8f1b6b68f1ce0b4a93504b3f06f65931709277afb1a1ee9fe963094bca02 opencv-4.5.5.tar.gz
8469de524e8e6f4c50a74b8cbec5e4cfc48a63a6dfc787609696099eca40dc02b9dc7a347a014d4416fd4efd66955d3af5f4847f44612312a8362f453e6c2e35 opencv_contrib-4.5.5.tar.gz
c18dfc11ba2a2ed1b52b3aa4266f7b70a7cc2c7a0a4596747f846211eeee3b13ae1c8d43552c6ece87c1b4d23032faa252b222c40c6d12a230bb63eeb89fbfaa ffmpeg5.patch
9e7b78ac4148fdf0ed6b4b4786689ba36e40d3cf569b8e44da57403f520ebc0e24edb77a988a25ccc2784e5b76e612a258bc032eb727e49bf89ef34816581fdd ffmpeg-memory-leak.patch
93d7807794682990b6a1d1de1851986ae3c5d1afe6605f3f8cace03ba5e3390bee2568bc0f335af34d3fc974df64cbce0ce685261ec2abd693d259b97b15bc46 opencv-4.6.0.tar.gz
2e9cc9632774babf59cd186cd7b7edbd35a816bdda2acb51339c514a33fc6d8c3f1687eb3b0f6827304e3fcb0f9f3e81d47e8ab08239175750ac1240cc99dc5d opencv_contrib-4.6.0.tar.gz
"
This diff is collapsed.
Click to expand it.
community/opencv/ffmpeg-memory-leak.patch
deleted
100644 → 0
+
0
−
70
View file @
d8abd518
Patch-Source: https://github.com/opencv/opencv/pull/21819
From 271f7df3435c619ceba9261f88dcfbb0714b0b0d Mon Sep 17 00:00:00 2001
From: Alexander Alekhin <alexander.a.alekhin@gmail.com>
Date: Fri, 1 Apr 2022 18:02:14 +0000
Subject: [PATCH] videoio(ffmpeg): avoid memory leaks
---
modules/videoio/src/cap_ffmpeg_impl.hpp | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp
index 91a0f710aa63..b7fa0b745c1e 100644
--- a/modules/videoio/src/cap_ffmpeg_impl.hpp
+++ b/modules/videoio/src/cap_ffmpeg_impl.hpp
@@ -2496,17 +2496,13 @@
double CvVideoWriter_FFMPEG::getProperty(int propId) const
/// close video output stream and free associated memory
void CvVideoWriter_FFMPEG::close()
{
- // nothing to do if already released
- if ( !picture )
- return;
-
/* no more frame to compress. The codec has a latency of a few
frames if using B frames, so we get the last frames by
passing the same picture again */
// TODO -- do we need to account for latency here?
/* write the trailer, if any */
- if(ok && oc)
+ if (picture && ok && oc)
{
#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0)
if (!(oc->oformat->flags & AVFMT_RAWPICTURE))
@@ -2529,7 +2525,7 @@
void CvVideoWriter_FFMPEG::close()
}
// free pictures
- if( context->pix_fmt != input_pix_fmt)
+ if (picture && context && context->pix_fmt != input_pix_fmt)
{
if(picture->data[0])
free(picture->data[0]);
@@ -2540,8 +2536,14 @@
void CvVideoWriter_FFMPEG::close()
if (input_picture)
av_free(input_picture);
+#ifdef CV_FFMPEG_CODECPAR
+ avcodec_free_context(&context);
+#else
/* close codec */
- avcodec_close(context);
+ if (context) // fixed after https://github.com/FFmpeg/FFmpeg/commit/3e1f507f3e8f16b716aa115552d243b48ae809bd
+ avcodec_close(context);
+ context = NULL;
+#endif
av_free(outbuf);
@@ -2935,10 +2937,7 @@
bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc,
#endif
#ifdef CV_FFMPEG_CODECPAR
- if (context)
- {
- avcodec_free_context(&context);
- }
+ avcodec_free_context(&context);
#endif
context = icv_configure_video_stream_FFMPEG(oc, video_st, codec,
width, height, (int) (bitrate + 0.5),
This diff is collapsed.
Click to expand it.
community/opencv/ffmpeg5.patch
deleted
100644 → 0
+
0
−
1002
View file @
d8abd518
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment