changeset 8885:33fb8b6b8547

I hope this works as expected with old lavc versions. At least it compiles now.
author rfelker
date Sat, 11 Jan 2003 05:06:48 +0000
parents 06d26fe09f46
children d32accfed8e6
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sat Jan 11 01:30:37 2003 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sat Jan 11 05:06:48 2003 +0000
@@ -45,6 +45,11 @@
 #define coded_frame coded_picture
 #endif
 
+#if LIBAVCODEC_BUILD < 4654
+#define PIX_FMT_RGB24 PIX_FMT_BGR24
+#define PIX_FMT_RGBA32 PIX_FMT_BGRA32
+#endif
+
 int avcodec_inited=0;
 
 #if defined(FF_POSTPROCESS) && defined(MBR)
@@ -350,8 +355,8 @@
 	case PIX_FMT_YUV444P: ctx->best_csp=IMGFMT_444P;break; //photo jpeg
 	case PIX_FMT_YUV411P: ctx->best_csp=IMGFMT_411P;break; //dv ntsc
 	case PIX_FMT_YUV422:  ctx->best_csp=IMGFMT_YUY2;break; //huffyuv perhaps in the future
-	case PIX_FMT_BGR24 :  ctx->best_csp=IMGFMT_BGR24;break; //huffyuv
-	case PIX_FMT_BGRA32:  ctx->best_csp=IMGFMT_BGR32;break; //huffyuv
+	case PIX_FMT_RGB24 :  ctx->best_csp=IMGFMT_BGR24;break; //huffyuv
+	case PIX_FMT_RGBA32:  ctx->best_csp=IMGFMT_BGR32;break; //huffyuv
 	default:
 	    ctx->best_csp=0;
 	}