Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-10 18:35:31 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-10 18:48:43 +0300
commitb26497f8242464fc5118326e5d5e0ec5a4146797 (patch)
tree4fa69fd0da43b0dedc619cbd5cdee2e7f931e583 /libavcodec/mjpegenc_common.c
parent7a7ca3cc2f43e7a7b61fdad8200b365ff0977bd2 (diff)
avcodec/mjpegenc_common: do not ignore the color_range field
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mjpegenc_common.c')
-rw-r--r--libavcodec/mjpegenc_common.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c
index 2fccae3dee..64e14253eb 100644
--- a/libavcodec/mjpegenc_common.c
+++ b/libavcodec/mjpegenc_common.c
@@ -145,9 +145,10 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
AV_WB16(ptr, size);
}
- if (avctx->pix_fmt == AV_PIX_FMT_YUV420P ||
- avctx->pix_fmt == AV_PIX_FMT_YUV422P ||
- avctx->pix_fmt == AV_PIX_FMT_YUV444P) {
+ if (((avctx->pix_fmt == AV_PIX_FMT_YUV420P ||
+ avctx->pix_fmt == AV_PIX_FMT_YUV422P ||
+ avctx->pix_fmt == AV_PIX_FMT_YUV444P) && avctx->color_range != AVCOL_RANGE_JPEG)
+ || avctx->color_range == AVCOL_RANGE_MPEG) {
put_marker(p, COM);
flush_put_bits(p);
ptr = put_bits_ptr(p);