Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package opencv for openSUSE:Factory checked 
in at 2022-05-04 15:10:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/opencv (Old)
 and      /work/SRC/openSUSE:Factory/.opencv.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "opencv"

Wed May  4 15:10:47 2022 rev:95 rq:974750 version:4.5.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/opencv/opencv.changes    2022-04-01 
21:36:56.660945351 +0200
+++ /work/SRC/openSUSE:Factory/.opencv.new.1538/opencv.changes  2022-05-04 
15:11:08.580171462 +0200
@@ -1,0 +2,17 @@
+Fri Apr 29 16:54:16 UTC 2022 - Stefan Br??ns <stefan.bru...@rwth-aachen.de>
+
+- Add upstream patches for FFmpeg 5.0 support, add
+  * videoio_initial_FFmpeg_5_0_support.patch
+  * videoio_ffmpeg_avoid_memory_leaks.patch
+
+-------------------------------------------------------------------
+Sat Apr  9 17:42:50 UTC 2022 - Stefan Br??ns <stefan.bru...@rwth-aachen.de>
+
+- Restore memoryperjob constraint, avoid being scheduled on a 16
+  core system and use less than half of it.
+- Adjust %limit_build to 1800, to avoid recurrent build failures
+  on aarch64. (People should not care for their pet architecture
+  only, but also carefully check if they break others.)
+- Add missing libopencv_aruco dependency in devel package.
+
+-------------------------------------------------------------------

New:
----
  videoio_ffmpeg_avoid_memory_leaks.patch
  videoio_initial_FFmpeg_5_0_support.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ opencv.spec ++++++
--- /var/tmp/diff_new_pack.L8U11D/_old  2022-05-04 15:11:09.948173145 +0200
+++ /var/tmp/diff_new_pack.L8U11D/_new  2022-05-04 15:11:09.948173145 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package opencv
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -47,6 +47,10 @@
 Source1:        
https://github.com/opencv/opencv_contrib/archive/%{version}.tar.gz#/opencv_contrib-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM
 Patch0:         0001-highgui-Fix-unresolved-OpenGL-functions-for-Qt-backe.patch
+# PATCH-FIX-UPSTREAM
+Patch1:         
https://github.com/opencv/opencv/pull/21754.patch#/videoio_initial_FFmpeg_5_0_support.patch
+# PATCH-FIX-UPSTREAM
+Patch2:         
https://github.com/opencv/opencv/commit/271f7df3435c619ceba9261f88dcfbb0714b0b0d.patch#/videoio_ffmpeg_avoid_memory_leaks.patch
 BuildRequires:  cmake
 BuildRequires:  fdupes
 BuildRequires:  libeigen3-devel
@@ -213,6 +217,7 @@
 License:        BSD-3-Clause
 Group:          Development/Libraries/C and C++
 Requires:       %{libname}%{soname} = %{version}
+Requires:       libopencv_aruco%{soname} = %{version}
 Requires:       libopencv_face%{soname} = %{version}
 Requires:       libopencv_highgui%{soname} = %{version}
 Requires:       libopencv_imgcodecs%{soname} = %{version}
@@ -283,7 +288,7 @@
 rm -f doc/packaging.txt
 
 %build
-%limit_build -m 1700
+%limit_build -m 1800
 
 # openCV does not understand the standard RelWithDebinfo,
 #   but has a separate variable for it

++++++ _constraints ++++++
--- /var/tmp/diff_new_pack.L8U11D/_old  2022-05-04 15:11:09.984173189 +0200
+++ /var/tmp/diff_new_pack.L8U11D/_new  2022-05-04 15:11:09.988173194 +0200
@@ -7,6 +7,11 @@
     <memory>
       <size unit="M">5700</size>
     </memory>
+    <memoryperjob>
+      <!-- This is the max available on all archs -->
+      <!-- The actual requirement is enforced with limit_build -->
+      <size unit="M">1200</size>
+    </memoryperjob>
   </hardware>
 </constraints>
 

++++++ videoio_ffmpeg_avoid_memory_leaks.patch ++++++
>From 271f7df3435c619ceba9261f88dcfbb0714b0b0d Mon Sep 17 00:00:00 2001
From: Alexander Alekhin <alexander.a.alek...@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),

++++++ videoio_initial_FFmpeg_5_0_support.patch ++++++
++++ 1002 lines (skipped)

Reply via email to