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

Originally committed as revision 20796 to svn://svn.ffmpeg.org/ffmpeg/trunk
release/0.6
Carl Eugen Hoyos 15 years ago
parent f63e5a7410
commit ab176fdffb
  1. 3
      libavcodec/mjpegdec.c
  2. 1
      libavformat/riff.c

@ -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;
}

@ -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') },

Loading…
Cancel
Save