X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=pkgsrc-cinelerra-cv.git;a=blobdiff_plain;f=patches%2Fpatch-ffmpeg_C;fp=patches%2Fpatch-ffmpeg_C;h=e31072fc65f103597c1a6f715ba95c076d680a88;hp=0000000000000000000000000000000000000000;hb=7dddc5098a70b61fa8021db2e051d5b4a8403aa1;hpb=862d0343df3a5c45a375ee3e594007f305359814 diff --git a/patches/patch-ffmpeg_C b/patches/patch-ffmpeg_C new file mode 100644 index 0000000..e31072f --- /dev/null +++ b/patches/patch-ffmpeg_C @@ -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 ++#include + } + #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;