]> gitweb @ CieloNegro.org - pkgsrc-cinelerra-cv.git/blob - patches/patch-ffmpeg_C
shmmax patch
[pkgsrc-cinelerra-cv.git] / patches / patch-ffmpeg_C
1 $NetBSD$
2
3 --- cinelerra/ffmpeg.C.orig     2010-02-01 08:26:23.000000000 +0000
4 +++ cinelerra/ffmpeg.C
5 @@ -2,7 +2,7 @@
6  
7  #ifdef HAVE_SWSCALER
8  extern "C" {
9 -#include <swscale.h>
10 +#include <libswscale/swscale.h>
11  }
12  #endif
13  
14 @@ -69,12 +69,10 @@ CodecID FFMPEG::codec_id(char *codec_str
15  PixelFormat FFMPEG::color_model_to_pix_fmt(int color_model) {
16         switch (color_model) 
17                 { 
18 -               case BC_YUV422: 
19 -                         return PIX_FMT_YUV422;
20                 case BC_RGB888:
21                         return PIX_FMT_RGB24;
22                 case BC_BGR8888:  // NOTE: order flipped
23 -                       return PIX_FMT_RGBA32;
24 +                       return PIX_FMT_RGBA;
25                 case BC_BGR888:
26                         return PIX_FMT_BGR24;
27                 case BC_YUV420P: 
28 @@ -95,11 +93,9 @@ PixelFormat FFMPEG::color_model_to_pix_f
29  int FFMPEG::pix_fmt_to_color_model(PixelFormat pix_fmt) {
30         switch (pix_fmt) 
31                 { 
32 -               case PIX_FMT_YUV422:
33 -                       return BC_YUV422;
34                 case PIX_FMT_RGB24:
35                         return BC_RGB888;
36 -               case PIX_FMT_RGBA32:
37 +               case PIX_FMT_RGBA:
38                         return BC_BGR8888;
39                 case PIX_FMT_BGR24:
40                         return BC_BGR888;
41 @@ -286,7 +282,7 @@ int FFMPEG::convert_cmodel(AVPicture *pi
42         // make an intermediate temp frame only if necessary
43         int cmodel_in = pix_fmt_to_color_model(pix_fmt_in);
44         if (cmodel_in == BC_TRANSPARENCY) {
45 -               if (pix_fmt_in == PIX_FMT_RGBA32) {
46 +               if (pix_fmt_in == PIX_FMT_RGBA) {
47                         // avoid infinite recursion if things are broken
48                         printf("FFMPEG::convert_cmodel pix_fmt_in broken!\n");
49                         return 1;