[145950] trunk/dports/graphics/wxsvg
mojca at macports.org
mojca at macports.org
Mon Feb 22 05:44:06 PST 2016
Revision: 145950
https://trac.macports.org/changeset/145950
Author: mojca at macports.org
Date: 2016-02-22 05:44:06 -0800 (Mon, 22 Feb 2016)
Log Message:
-----------
wxsvg: compatibility with ffmpeg 3.0 (#50694)
Modified Paths:
--------------
trunk/dports/graphics/wxsvg/Portfile
Added Paths:
-----------
trunk/dports/graphics/wxsvg/files/
trunk/dports/graphics/wxsvg/files/patch-ffmpeg-3.0.diff
Modified: trunk/dports/graphics/wxsvg/Portfile
===================================================================
--- trunk/dports/graphics/wxsvg/Portfile 2016-02-22 13:41:38 UTC (rev 145949)
+++ trunk/dports/graphics/wxsvg/Portfile 2016-02-22 13:44:06 UTC (rev 145950)
@@ -7,6 +7,7 @@
name wxsvg
version 1.5.5
+revision 1
categories graphics
license wxwidgets-3
platforms darwin
@@ -35,4 +36,7 @@
require_active_variants cairo quartz
+# for compatibility with ffmpeg 3.0
+patchfiles patch-ffmpeg-3.0.diff
+
configure.args --with-wxdir=${wxWidgets.wxdir}
Added: trunk/dports/graphics/wxsvg/files/patch-ffmpeg-3.0.diff
===================================================================
--- trunk/dports/graphics/wxsvg/files/patch-ffmpeg-3.0.diff (rev 0)
+++ trunk/dports/graphics/wxsvg/files/patch-ffmpeg-3.0.diff 2016-02-22 13:44:06 UTC (rev 145950)
@@ -0,0 +1,37 @@
+https://trac.macports.org/ticket/50694
+https://sourceforge.net/p/wxsvg/discussion/424987/thread/576bf3a0/
+
+PIX_FMT_RGB24 has already been replaced by AV_PIX_FMT_RGB24 upstream
+ http://wxsvg.cvs.sourceforge.net/viewvc/wxsvg/wxsvg/src/mediadec_ffmpeg.cpp?r1=1.32&r2=1.33
+The other patch is optional for now. The compiler throws deprecation warnings only.
+
+--- src/mediadec_ffmpeg.cpp.orig
++++ src/mediadec_ffmpeg.cpp
+@@ -263,9 +263,9 @@ wxImage wxFfmpegMediaDecoder::GetNextFrame() {
+ avcodec_decode_video2(m_codecCtx, m_frame, &frameFinished, &packet);
+ if (frameFinished) {
+ SwsContext* imgConvertCtx = sws_getContext(m_codecCtx->width, m_codecCtx->height, m_codecCtx->pix_fmt,
+- m_width, m_height, PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL);
++ m_width, m_height, AV_PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL);
+ if (imgConvertCtx == NULL) {
+- av_free_packet(&packet);
++ av_packet_unref(&packet);
+ return wxImage();
+ }
+
+@@ -273,13 +273,13 @@ wxImage wxFfmpegMediaDecoder::GetNextFrame() {
+ uint8_t *rgbSrc[3] = { img.GetData(), NULL, NULL };
+ int rgbStride[3] = { 3 * m_width, 0, 0 };
+ sws_scale(imgConvertCtx, m_frame->data, m_frame->linesize, 0, m_codecCtx->height, rgbSrc, rgbStride);
+- av_free_packet(&packet);
++ av_packet_unref(&packet);
+ sws_freeContext(imgConvertCtx);
+ return img;
+ }
+ }
+ // free the packet that was allocated by av_read_frame
+- av_free_packet(&packet);
++ av_packet_unref(&packet);
+ }
+ return wxImage();
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160222/a284ae20/attachment.html>
More information about the macports-changes
mailing list