(Partly) support Metasoft MJPEG Codec, fixes half of issue 1611.

Originally committed as revision 20796 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Carl Eugen Hoyos 2009-12-10 23:06:23 +00:00
parent f63e5a7410
commit ab176fdffb
2 changed files with 3 additions and 1 deletions

View File

@ -1182,7 +1182,8 @@ static int mjpeg_decode_com(MJpegDecodeContext *s)
else if(!strcmp(cbuf, "CS=ITU601")){
s->cs_itu601= 1;
}
else if(len > 20 && !strncmp(cbuf, "Intel(R) JPEG Library", 21)){
else if((len > 20 && !strncmp(cbuf, "Intel(R) JPEG Library", 21)) ||
(len > 19 && !strncmp(cbuf, "Metasoft MJPEG Codec", 20))){
s->flipped = 1;
}

View File

@ -138,6 +138,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
{ CODEC_ID_MJPEG, MKTAG('M', 'V', 'J', 'P') }, /* Midvid JPEG Video Codec */
{ CODEC_ID_MJPEG, MKTAG('A', 'V', 'I', '1') },
{ CODEC_ID_MJPEG, MKTAG('A', 'V', 'I', '2') },
{ CODEC_ID_MJPEG, MKTAG('M', 'T', 'S', 'J') },
{ CODEC_ID_HUFFYUV, MKTAG('H', 'F', 'Y', 'U') },
{ CODEC_ID_FFVHUFF, MKTAG('F', 'F', 'V', 'H') },
{ CODEC_ID_CYUV, MKTAG('C', 'Y', 'U', 'V') },