From 9bc1f9b4d7f833d7e907c821768598dc4d7e4afc Mon Sep 17 00:00:00 2001 From: Fredrik Mellbin Date: Tue, 9 Sep 2008 22:03:42 +0000 Subject: [PATCH] FFmpegSource2: the mandatory fixing Originally committed to SVN as r2333. --- FFmpegSource2/ffvideosource.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/FFmpegSource2/ffvideosource.cpp b/FFmpegSource2/ffvideosource.cpp index 5d8359583..b6762d7c0 100644 --- a/FFmpegSource2/ffvideosource.cpp +++ b/FFmpegSource2/ffvideosource.cpp @@ -117,9 +117,8 @@ AVFrame *GetFrameByTime(double Time, char *ErrorMsg, unsigned MsgSize) { int VideoBase::SetOutputFormat(int TargetFormats, int Width, int Height) { int Loss; - int OutputFormat = avcodec_find_best_pix_fmt((1 << PIX_FMT_YUVJ420P) - | (1 << PIX_FMT_YUV420P) | (1 << PIX_FMT_YUYV422) | (1 << PIX_FMT_RGB32) - | (1 << PIX_FMT_BGR24), CodecContext->pix_fmt, 1 /* Required to prevent pointless RGB32 => RGB24 conversion */, &Loss); + int OutputFormat = avcodec_find_best_pix_fmt(TargetFormats, + CodecContext->pix_fmt, 1 /* Required to prevent pointless RGB32 => RGB24 conversion */, &Loss); if (OutputFormat == -1) return -1;