[libav-devel] [PATCH] mjpegdec: Properly set the context colorspace info

Luca Barbato lu_zero at gentoo.org
Tue Jun 24 19:21:40 CEST 2014


On 24/06/14 18:41, Derek Buitenhuis wrote:
> The JPEG spec requires it to be this.
> 
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
>  libavcodec/mjpegdec.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
> index adcab4f..f674539 100644
> --- a/libavcodec/mjpegdec.c
> +++ b/libavcodec/mjpegdec.c
> @@ -103,6 +103,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
>      s->first_picture = 1;
>      s->org_height    = avctx->coded_height;
>      avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
> +    avctx->colorspace = AVCOL_SPC_BT470BG;
>  
>      build_basic_mjpeg_vlc(s);
>  
> 

Sounds fine.


More information about the libav-devel mailing list