UPDATE: openimageio - FFmpeg API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

UPDATE: openimageio - FFmpeg API

Brad Smith-14
Update API usage to deal with current vs new FFmpeg API.


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/graphics/openimageio/Makefile,v
retrieving revision 1.32
diff -u -p -u -p -r1.32 Makefile
--- Makefile 25 Jan 2019 20:09:43 -0000 1.32
+++ Makefile 21 Feb 2019 12:23:41 -0000
@@ -10,7 +10,7 @@ GH_PROJECT = oiio
 V = 1.8.6
 GH_TAGNAME = Release-$V
 DISTNAME = openimageio-${V}
-REVISION = 1
+REVISION = 2
 
 SHARED_LIBS += OpenImageIO 5.0 # 1.0
 SHARED_LIBS +=   OpenImageIO_Util 2.0 # 1.5
Index: patches/patch-src_ffmpeg_imageio_ffmpeginput_cpp
===================================================================
RCS file: patches/patch-src_ffmpeg_imageio_ffmpeginput_cpp
diff -N patches/patch-src_ffmpeg_imageio_ffmpeginput_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_ffmpeg_imageio_ffmpeginput_cpp 21 Feb 2019 12:34:41 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Update for newer FFmpeg API.
+
+Index: src/ffmpeg.imageio/ffmpeginput.cpp
+--- src/ffmpeg.imageio/ffmpeginput.cpp.orig
++++ src/ffmpeg.imageio/ffmpeginput.cpp
+@@ -330,7 +330,7 @@ FFmpegInput::open (const std::string &name, ImageSpec
+         !strcmp (m_codec_context->codec->name, "dvvideo")) {
+         m_offset_time = false;
+     }
+-    m_codec_cap_delay = (bool) (m_codec_context->codec->capabilities & CODEC_CAP_DELAY);
++    m_codec_cap_delay = (bool) (m_codec_context->codec->capabilities & AV_CODEC_CAP_DELAY);
+
+     AVStream *stream = m_format_context->streams[m_video_stream];
+     if (stream->r_frame_rate.num != 0 && stream->r_frame_rate.den != 0) {