Hi!
Attached patch fixes the colour range for mpeg4 gray decoding.
Less ugly suggestions welcome.
Please comment, Carl Eugen
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index c47f5b1..162c295 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -48,8 +48,10 @@ static enum AVPixelFormat h263_get_format(AVCodecContext
*avctx)
if (avctx->codec->id == AV_CODEC_ID_MSS2)
return AV_PIX_FMT_YUV420P;
- if (CONFIG_GRAY && (avctx->flags & CODEC_FLAG_GRAY))
+ if (CONFIG_GRAY && (avctx->flags & CODEC_FLAG_GRAY)) {
+ avctx->color_range = AVCOL_RANGE_MPEG;
return AV_PIX_FMT_GRAY8;
+ }
return avctx->pix_fmt = ff_get_format(avctx, avctx->codec->pix_fmts);
}
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel