]> git.pld-linux.org Git - packages/vtk.git/blob - ffmpeg3.patch
- rel 7
[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 @@ -274,13 +274,13 @@
18  #endif
19  
20    //for the output of the writer's input...
21 -  this->rgbInput = avcodec_alloc_frame();
22 +  this->rgbInput = av_frame_alloc();
23    if (!this->rgbInput)
24      {
25      vtkGenericWarningMacro (<< "Could not make rgbInput avframe." );
26      return 0;
27      }
28 -  int RGBsize = avpicture_get_size(PIX_FMT_RGB24, c->width, c->height);
29 +  int RGBsize = avpicture_get_size(AV_PIX_FMT_RGB24, c->width, c->height);
30    unsigned char *rgb = (unsigned char *)av_malloc(sizeof(unsigned char) * RGBsize);
31    if (!rgb)
32      {
33 @@ -288,10 +288,10 @@
34      return 0;
35      }
36    //The rgb buffer should get deleted when this->rgbInput is.
37 -  avpicture_fill((AVPicture *)this->rgbInput, rgb, PIX_FMT_RGB24, c->width, c->height);
38 +  avpicture_fill((AVPicture *)this->rgbInput, rgb, AV_PIX_FMT_RGB24, c->width, c->height);
39  
40    //and for the output to the codec's input.
41 -  this->yuvOutput = avcodec_alloc_frame();
42 +  this->yuvOutput = av_frame_alloc();
43    if (!this->yuvOutput)
44      {
45      vtkGenericWarningMacro (<< "Could not make yuvOutput avframe." );
46 @@ -349,12 +349,12 @@
47    //convert that to YUV for input to the codec
48  #ifdef VTK_FFMPEG_HAS_IMG_CONVERT
49    img_convert((AVPicture *)this->yuvOutput, cc->pix_fmt,
50 -              (AVPicture *)this->rgbInput, PIX_FMT_RGB24,
51 +              (AVPicture *)this->rgbInput, AV_PIX_FMT_RGB24,
52                cc->width, cc->height);
53  #else
54    //convert that to YUV for input to the codec
55    SwsContext* convert_ctx = sws_getContext(
56 -    cc->width, cc->height, PIX_FMT_RGB24,
57 +    cc->width, cc->height, AV_PIX_FMT_RGB24,
58      cc->width, cc->height, cc->pix_fmt,
59      SWS_BICUBIC, NULL, NULL, NULL);
60  
61 --- /home/users/baggins/devel/PLD/rpm/BUILD/VTK-6.3.0/IO/FFMPEG/vtkFFMPEGWriter.cxx.orig        2016-03-15 21:17:23.644519836 +0100
62 +++ /home/users/baggins/devel/PLD/rpm/BUILD/VTK-6.3.0/IO/FFMPEG/vtkFFMPEGWriter.cxx     2016-03-15 21:17:32.411309228 +0100
This page took 0.455715 seconds and 3 git commands to generate.