[paraview] 01/02: Fix FTBFS against ffmpeg_3.0. (Closes: #821419)

Anton Gladky gladk at moszumanska.debian.org
Wed Apr 20 19:14:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch master
in repository paraview.

commit ad5f3f0208215ce81472192497e298a74bed93f2
Author: Anton Gladky <gladk at debian.org>
Date:   Wed Apr 20 21:11:44 2016 +0200

    Fix FTBFS against ffmpeg_3.0. (Closes: #821419)
---
 debian/patches/ffmpeg.patch | 67 +++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series       |  1 +
 2 files changed, 68 insertions(+)

diff --git a/debian/patches/ffmpeg.patch b/debian/patches/ffmpeg.patch
new file mode 100644
index 0000000..1e34597
--- /dev/null
+++ b/debian/patches/ffmpeg.patch
@@ -0,0 +1,67 @@
+Description: fix compilation againts ffmpeg_3.0
+Origin: http://www.paraview.org/Bug/view.php?id=16001
+Acked-By: Anton Gladky <gladk at debian.org>
+Last-Update: 2016-04-20
+
+Index: paraview/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx
+===================================================================
+--- paraview.orig/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx
++++ paraview/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx
+@@ -195,11 +195,11 @@ int vtkFFMPEGWriterInternal::Start()
+   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
+@@ -278,13 +278,13 @@ int vtkFFMPEGWriterInternal::Start()
+ #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 = (unsigned char *)av_malloc(sizeof(unsigned char) * RGBsize);
+   if (!rgb)
+     {
+@@ -292,10 +292,10 @@ int vtkFFMPEGWriterInternal::Start()
+     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." );
+@@ -353,12 +353,12 @@ int vtkFFMPEGWriterInternal::Write(vtkIm
+   //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);
+ 
diff --git a/debian/patches/series b/debian/patches/series
index ddfef58..f9598f9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ use_system_xdmf.patch
 use_system_utf8.patch
 use_system_mpi4py.patch
 remove_webgl.patch
+ffmpeg.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/paraview.git



More information about the debian-science-commits mailing list