]> git.pld-linux.org Git - packages/vtk.git/blob - ffmpeg3.patch
- fix building with ffmpeg 3.x
[packages/vtk.git] / ffmpeg3.patch
1 --- VTK-6.3.0/IO/FFMPEG/vtkFFMPEGWriter.cxx~    2015-09-01 23:41:26.000000000 +0200
2 +++ VTK-6.3.0/IO/FFMPEG/vtkFFMPEGWriter.cxx     2016-03-15 20:58:02.064844887 +0100
3 @@ -191,11 +191,11 @@
4    c->height = this->Dim[1];
5    if (this->Writer->GetCompression())
6      {
7 -    c->pix_fmt = PIX_FMT_YUVJ422P;
8 +    c->pix_fmt = AV_PIX_FMT_YUVJ422P;
9      }
10    else
11      {
12 -    c->pix_fmt = PIX_FMT_BGR24;
13 +    c->pix_fmt = AV_PIX_FMT_BGR24;
14      }
15  
16    //to do playback at actual recorded rate, this will need more work see also below
17 @@ -280,7 +280,7 @@
18      vtkGenericWarningMacro (<< "Could not make rgbInput avframe." );
19      return 0;
20      }
21 -  int RGBsize = avpicture_get_size(PIX_FMT_RGB24, c->width, c->height);
22 +  int RGBsize = avpicture_get_size(AV_PIX_FMT_RGB24, c->width, c->height);
23    unsigned char *rgb = (unsigned char *)av_malloc(sizeof(unsigned char) * RGBsize);
24    if (!rgb)
25      {
26 @@ -288,7 +288,7 @@
27      return 0;
28      }
29    //The rgb buffer should get deleted when this->rgbInput is.
30 -  avpicture_fill((AVPicture *)this->rgbInput, rgb, PIX_FMT_RGB24, c->width, c->height);
31 +  avpicture_fill((AVPicture *)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height);
32  
33    //and for the output to the codec's input.
34    this->yuvOutput = avcodec_alloc_frame();
35 @@ -349,12 +349,12 @@
36    //convert that to YUV for input to the codec
37  #ifdef VTK_FFMPEG_HAS_IMG_CONVERT
38    img_convert((AVPicture *)this->yuvOutput, cc->pix_fmt,
39 -              (AVPicture *)this->rgbInput, PIX_FMT_RGB24,
40 +              (AVPicture *)this->rgbInput, AV_PIX_FMT_RGB24,
41                cc->width, cc->height);
42  #else
43    //convert that to YUV for input to the codec
44    SwsContext* convert_ctx = sws_getContext(
45 -    cc->width, cc->height, PIX_FMT_RGB24,
46 +    cc->width, cc->height, AV_PIX_FMT_RGB24,
47      cc->width, cc->height, cc->pix_fmt,
48      SWS_BICUBIC, NULL, NULL, NULL);
49  
This page took 0.045767 seconds and 4 git commands to generate.