[FFmpeg-devel] [PATCH] fraps: set color range.
Paul B Mahol
onemda at gmail.com
Tue Jan 22 17:02:13 CET 2013
Also stop using YUVJ420P as is deprecated.
Fixes ffplay output (previous one was too bright).
Should fix #1636.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavcodec/fraps.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index cc2f52b..5abce69 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -207,7 +207,9 @@ static int decode_frame(AVCodecContext *avctx,
f->reference = 0;
f->buffer_hints = FF_BUFFER_HINTS_VALID;
- pix_fmt = version & 1 ? AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUVJ420P;
+ pix_fmt = version & 1 ? AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUV420P;
+ if (!(version & 1))
+ avctx->color_range = AVCOL_RANGE_JPEG;
if (avctx->pix_fmt != pix_fmt && f->data[0]) {
avctx->release_buffer(avctx, f);
}
--
1.7.11.4
More information about the ffmpeg-devel
mailing list