Tuesday, August 11, 2026

Re: graphics/opencv: compatibility with ffmpeg 9.0

On Mon Aug 10, 2026 at 12:37:17PM +0200, Kirill A. Korinsky wrote: > Rafael, ports@, > > I'd like to commit a fix for graphics/opencv which switches it away from > deprecated API in ffmpeg which prevents it to build against ffmpeg 9.0 > > Build tested against ffmpeg-9.0 and ffmpeg-8.1.2 Is this from upstream? Please add a comment on top of the patch. Otherwise OK rsadowski > > Ok? > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/graphics/opencv/Makefile,v > diff -u -p -r1.112 Makefile > --- Makefile 22 Jun 2026 17:49:21 -0000 1.112 > +++ Makefile 10 Aug 2026 10:35:18 -0000 > @@ -8,7 +8,7 @@ V = 4.13.0 > GH_ACCOUNT = opencv > GH_PROJECT = opencv > GH_TAGNAME = ${V} > -REVISION-main = 0 > +REVISION-main = 1 > REVISION-java = 0 > > PKGNAME-main = opencv-${V} > Index: patches/patch-modules_videoio_src_cap_ffmpeg_hw_hpp > =================================================================== > RCS file: patches/patch-modules_videoio_src_cap_ffmpeg_hw_hpp > diff -N patches/patch-modules_videoio_src_cap_ffmpeg_hw_hpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-modules_videoio_src_cap_ffmpeg_hw_hpp 10 Aug 2026 10:35:18 -0000 > @@ -0,0 +1,36 @@ > +Index: modules/videoio/src/cap_ffmpeg_hw.hpp > +--- modules/videoio/src/cap_ffmpeg_hw.hpp.orig > ++++ modules/videoio/src/cap_ffmpeg_hw.hpp > +@@ -739,7 +739,9 @@ bool hw_check_codec(AVCodec* codec, AVHWDeviceType hw_ > + static > + AVCodec *hw_find_codec(AVCodecID id, AVHWDeviceType hw_type, int (*check_category)(const AVCodec *), const char *disabled_codecs, AVPixelFormat *hw_pix_fmt) { > + AVCodec *c = 0; > ++ const enum AVPixelFormat *pix_fmts; > + void *opaque = 0; > ++ int ret, num_pix_fmts; > + > + while (NULL != (c = (AVCodec*)av_codec_iterate(&opaque))) > + { > +@@ -757,12 +759,16 @@ AVCodec *hw_find_codec(AVCodecID id, AVHWDeviceType hw > +

No comments:

Post a Comment