diff options
author | eolianoe | 2016-07-12 14:22:48 +0200 |
---|---|---|
committer | eolianoe | 2016-07-12 14:22:48 +0200 |
commit | 5e75f4f13e126ac9afe4af177d00c179e382e4aa (patch) | |
tree | 34ffc5ee1519c5fd68b31232bc832e7af663ede1 /ffmpeg3_compat.patch | |
parent | af1022e82d4fcdc56a11225a3b2299f7c71e5314 (diff) | |
download | aur-5e75f4f13e126ac9afe4af177d00c179e382e4aa.tar.gz |
Fix various compilations issues
with ffmpeg>=3 and hdf5>=1.10.0
Diffstat (limited to 'ffmpeg3_compat.patch')
-rw-r--r-- | ffmpeg3_compat.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/ffmpeg3_compat.patch b/ffmpeg3_compat.patch new file mode 100644 index 000000000000..0ba6b5b31cf3 --- /dev/null +++ b/ffmpeg3_compat.patch @@ -0,0 +1,74 @@ +--- a/IO/FFMPEG/vtkFFMPEGWriter.cxx 2014-01-22 16:55:41.000000000 +0100 ++++ b/IO/FFMPEG/vtkFFMPEGWriter.cxx.new 2016-07-12 10:49:35.569696418 +0200 +@@ -143,11 +143,11 @@ + if (this->Writer->GetCompression()) + { + //choose a codec that is easily playable on windows +- this->avOutputFormat->video_codec = CODEC_ID_MJPEG; ++ this->avOutputFormat->video_codec = AV_CODEC_ID_MJPEG; + } + else + { +- this->avOutputFormat->video_codec = CODEC_ID_RAWVIDEO; ++ this->avOutputFormat->video_codec = AV_CODEC_ID_RAWVIDEO; + } + + //assign the format to the context +@@ -184,11 +184,11 @@ + c->height = this->Dim[1]; + if (this->Writer->GetCompression()) + { +- c->pix_fmt = PIX_FMT_YUVJ422P; ++ c->pix_fmt = AV_PIX_FMT_YUVJ422P; + } + else + { +- c->pix_fmt = PIX_FMT_BGR24; ++ c->pix_fmt = AV_PIX_FMT_BGR24; + } + + //to do playback at actual recorded rate, this will need more work see also below +@@ -267,13 +267,13 @@ + #endif + + //for the output of the writer's input... +- this->rgbInput = avcodec_alloc_frame(); ++ this->rgbInput = av_frame_alloc(); + if (!this->rgbInput) + { + vtkGenericWarningMacro (<< "Could not make rgbInput avframe." ); + return 0; + } +- int RGBsize = avpicture_get_size(PIX_FMT_RGB24, c->width, c->height); ++ int RGBsize = avpicture_get_size(AV_PIX_FMT_RGB24, c->width, c->height); + unsigned char *rgb = new unsigned char[RGBsize]; + if (!rgb) + { +@@ -281,10 +281,10 @@ + return 0; + } + //The rgb buffer should get deleted when this->rgbInput is. +- avpicture_fill((AVPicture *)this->rgbInput, rgb, PIX_FMT_RGB24, c->width, c->height); ++ avpicture_fill((AVPicture *)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height); + + //and for the output to the codec's input. +- this->yuvOutput = avcodec_alloc_frame(); ++ this->yuvOutput = av_frame_alloc(); + if (!this->yuvOutput) + { + vtkGenericWarningMacro (<< "Could not make yuvOutput avframe." ); +@@ -342,12 +342,12 @@ + //convert that to YUV for input to the codec + #ifdef VTK_FFMPEG_HAS_IMG_CONVERT + img_convert((AVPicture *)this->yuvOutput, cc->pix_fmt, +- (AVPicture *)this->rgbInput, PIX_FMT_RGB24, ++ (AVPicture *)this->rgbInput, AV_PIX_FMT_RGB24, + cc->width, cc->height); + #else + //convert that to YUV for input to the codec + SwsContext* convert_ctx = sws_getContext( +- cc->width, cc->height, PIX_FMT_RGB24, ++ cc->width, cc->height, AV_PIX_FMT_RGB24, + cc->width, cc->height, cc->pix_fmt, + SWS_BICUBIC, NULL, NULL, NULL); + |