diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 5b213e40e4c76cdc2ddb1668f32f9b53ebbcf899..d23c67c5f8beae69d38f69c88ff770cd5c130d8c 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -301,7 +301,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) switch(pix_fmt_id){ case 0x11111100: if(s->rgb){ - s->avctx->pix_fmt = PIX_FMT_RGB32; + s->avctx->pix_fmt = PIX_FMT_BGRA; }else s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV444P : PIX_FMT_YUVJ444P; assert(s->nb_components==3); diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index d7a85ee96c70da88a6593d9e477e08eeda3539b2..129a257d704e450985725edea6c5f3facaa6c741 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -211,7 +211,7 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s) } put_bits(&s->pb, 16, 17); - if(lossless && s->avctx->pix_fmt == PIX_FMT_RGB32) + if(lossless && s->avctx->pix_fmt == PIX_FMT_BGRA) put_bits(&s->pb, 8, 9); /* 9 bits/component RCT */ else put_bits(&s->pb, 8, 8); /* 8 bits/component */