1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

Metasoft MJPEG codec has Cb and Cr swapped, fixes issue 1611.

Originally committed as revision 21451 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Carl Eugen Hoyos 2010-01-26 10:30:24 +00:00
parent 6022255774
commit ddee80f384

View File

@ -920,6 +920,10 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s)
av_log(s->avctx, AV_LOG_ERROR, "decode_sos: index(%d) out of components\n", index);
return -1;
}
/* Metasoft MJPEG codec has Cb and Cr swapped */
if (s->avctx->codec_tag == MKTAG('M', 'T', 'S', 'J')
&& nb_components == 3 && s->nb_components == 3 && i)
index = 3 - i;
s->comp_index[i] = index;