aboutsummaryrefslogtreecommitdiff
path: root/cad/opencascade
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2018-05-02 13:25:55 +0000
committerJan Beich <jbeich@FreeBSD.org>2018-05-02 13:25:55 +0000
commit60dd4bb9fa1e312a02ec1345a14f909f06159910 (patch)
treef6f20654cc79899d19179aec536471b2c891933c /cad/opencascade
parentb63a711d7930f2bb4bd3af43b339acebbd66811e (diff)
downloadports-60dd4bb9fa1e312a02ec1345a14f909f06159910.tar.gz
ports-60dd4bb9fa1e312a02ec1345a14f909f06159910.zip
cad/opencascade: unbreak with ffmpeg 4.0
src/Image/Image_VideoRecorder.cxx:279:25: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER' aCodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER; ^ src/Image/Image_VideoRecorder.cxx:452:38: error: use of undeclared identifier 'AVFMT_RAWPICTURE' if ((myAVContext->oformat->flags & AVFMT_RAWPICTURE) != 0 ^ PR: 227726 Reported by: antoine (via exp-run)
Notes
Notes: svn path=/head/; revision=468831
Diffstat (limited to 'cad/opencascade')
-rw-r--r--cad/opencascade/files/patch-src_Image_Image__VideoRecorder.cxx34
1 files changed, 34 insertions, 0 deletions
diff --git a/cad/opencascade/files/patch-src_Image_Image__VideoRecorder.cxx b/cad/opencascade/files/patch-src_Image_Image__VideoRecorder.cxx
new file mode 100644
index 000000000000..27587410056e
--- /dev/null
+++ b/cad/opencascade/files/patch-src_Image_Image__VideoRecorder.cxx
@@ -0,0 +1,34 @@
+src/Image/Image_VideoRecorder.cxx:279:25: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER'
+ aCodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
+ ^
+src/Image/Image_VideoRecorder.cxx:452:38: error: use of undeclared identifier 'AVFMT_RAWPICTURE'
+ if ((myAVContext->oformat->flags & AVFMT_RAWPICTURE) != 0
+ ^
+
+--- src/Image/Image_VideoRecorder.cxx.orig 2017-08-30 13:28:21 UTC
++++ src/Image/Image_VideoRecorder.cxx
+@@ -276,7 +276,7 @@ Standard_Boolean Image_VideoRecorder::addVideoStream (
+ // some formats want stream headers to be separate
+ if (myAVContext->oformat->flags & AVFMT_GLOBALHEADER)
+ {
+- aCodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ aCodecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ }
+ return Standard_True;
+ #else
+@@ -449,6 +449,7 @@ Standard_Boolean Image_VideoRecorder::writeVideoFrame
+ AVPacket aPacket;
+ memset (&aPacket, 0, sizeof(aPacket));
+ av_init_packet (&aPacket);
++#ifdef AVFMT_RAWPICTURE
+ if ((myAVContext->oformat->flags & AVFMT_RAWPICTURE) != 0
+ && !theToFlush)
+ {
+@@ -461,6 +462,7 @@ Standard_Boolean Image_VideoRecorder::writeVideoFrame
+ aResAv = av_interleaved_write_frame (myAVContext, &aPacket);
+ }
+ else
++#endif
+ {
+ // encode the image
+ myFrame->pts = myFrameCount;