]> gitweb @ CieloNegro.org - pkgsrc-cinelerra-cv.git/blobdiff - patches/patch-ffmpeg_C
wip...
[pkgsrc-cinelerra-cv.git] / patches / patch-ffmpeg_C
diff --git a/patches/patch-ffmpeg_C b/patches/patch-ffmpeg_C
new file mode 100644 (file)
index 0000000..e31072f
--- /dev/null
@@ -0,0 +1,49 @@
+$NetBSD$
+
+--- cinelerra/ffmpeg.C.orig    2010-01-29 07:15:28.000000000 +0000
++++ cinelerra/ffmpeg.C
+@@ -2,7 +2,7 @@
+ #ifdef HAVE_SWSCALER
+ extern "C" {
+-#include <swscale.h>
++#include <libswscale/swscale.h>
+ }
+ #endif
+@@ -69,12 +69,10 @@ CodecID FFMPEG::codec_id(char *codec_str
+ PixelFormat FFMPEG::color_model_to_pix_fmt(int color_model) {
+       switch (color_model) 
+               { 
+-              case BC_YUV422: 
+-                        return PIX_FMT_YUV422;
+               case BC_RGB888:
+                       return PIX_FMT_RGB24;
+               case BC_BGR8888:  // NOTE: order flipped
+-                      return PIX_FMT_RGBA32;
++                      return PIX_FMT_RGBA;
+               case BC_BGR888:
+                       return PIX_FMT_BGR24;
+               case BC_YUV420P: 
+@@ -95,11 +93,9 @@ PixelFormat FFMPEG::color_model_to_pix_f
+ int FFMPEG::pix_fmt_to_color_model(PixelFormat pix_fmt) {
+       switch (pix_fmt) 
+               { 
+-              case PIX_FMT_YUV422:
+-                      return BC_YUV422;
+               case PIX_FMT_RGB24:
+                       return BC_RGB888;
+-              case PIX_FMT_RGBA32:
++              case PIX_FMT_RGBA:
+                       return BC_BGR8888;
+               case PIX_FMT_BGR24:
+                       return BC_BGR888;
+@@ -286,7 +282,7 @@ int FFMPEG::convert_cmodel(AVPicture *pi
+       // make an intermediate temp frame only if necessary
+       int cmodel_in = pix_fmt_to_color_model(pix_fmt_in);
+       if (cmodel_in == BC_TRANSPARENCY) {
+-              if (pix_fmt_in == PIX_FMT_RGBA32) {
++              if (pix_fmt_in == PIX_FMT_RGBA) {
+                       // avoid infinite recursion if things are broken
+                       printf("FFMPEG::convert_cmodel pix_fmt_in broken!\n");
+                       return 1;