tags 638246 patch
thanks

On Wed, Aug 17, 2011 at 10:11:18PM +0200, Moritz Muehlenhoff wrote:
> Package: paraview
> Severity: important
> 
> Hi,
> the transition from ffmpeg/0.6.2 to libav/0.7 is planned soonish.
> (libav is a ffmpeg fork, to which Debian will switch, see
> http://en.wikipedia.org/wiki/FFmpeg for more information)
> 
> Your package currently fails to build from source when built against
> libav/0.7.2 and needs to be adapted. You can test this yourself by
> building against the packages from experimental:

I've created a patch and verified paraview to compile against libav 0.7
from experimental. It should apply cleanly against current sid's libav
0.6 as well (the API elements being dropped have been deprecated for
a while).

Patch attached.

Cheers,
        Moritz
diff -aur paraview-3.10.1.orig//VTK/IO/vtkFFMPEGWriter.cxx paraview-3.10.1/VTK/IO/vtkFFMPEGWriter.cxx
--- paraview-3.10.1.orig//VTK/IO/vtkFFMPEGWriter.cxx	2011-04-13 18:17:23.000000000 +0200
+++ paraview-3.10.1/VTK/IO/vtkFFMPEGWriter.cxx	2011-09-01 23:09:30.000000000 +0200
@@ -123,7 +123,7 @@
     }
 
   //choose avi media file format
-  this->avOutputFormat = guess_format("avi", NULL, NULL);
+  this->avOutputFormat = av_guess_format("avi", NULL, NULL);
   if (!this->avOutputFormat) 
     {
     vtkGenericWarningMacro (<< "Could not open the avi media file format.");
@@ -150,7 +150,7 @@
   //Set up the codec.
   AVCodecContext *c = this->avStream->codec;
   c->codec_id = (CodecID)this->avOutputFormat->video_codec;
-  c->codec_type = CODEC_TYPE_VIDEO;
+  c->codec_type = AVMEDIA_TYPE_VIDEO;
   c->width = this->Dim[0];
   c->height = this->Dim[1];
   c->pix_fmt = PIX_FMT_YUVJ420P;
@@ -343,7 +343,7 @@
     pkt.stream_index = this->avStream->index;
     if (cc->coded_frame->key_frame) //treat keyframes well
       {
-      pkt.flags |= PKT_FLAG_KEY;
+      pkt.flags |= AV_PKT_FLAG_KEY;
       }
     pkt.duration = 0; //presentation duration in time_base units or 0 if NA
     pkt.pos = -1; //byte position in stream or -1 if NA

Reply via email to