1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

mjpeg: Do not fail jpeg decoding on bad EXIF data.

It is not required to correctly decode the image.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Justin Ruggles
2014-04-17 18:09:46 -04:00
committed by Derek Buitenhuis
parent 968c44ce89
commit 39ef000e19

View File

@@ -1665,9 +1665,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
ret = ff_tdecode_header(&gbytes, &le, &ifd_offset);
if (ret) {
av_log(s->avctx, AV_LOG_ERROR, "mjpeg: invalid TIFF header in EXIF data\n");
return ret;
}
} else {
bytestream2_seek(&gbytes, ifd_offset, SEEK_SET);
// read 0th IFD and store the metadata
@@ -1675,7 +1673,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
ret = avpriv_exif_decode_ifd(s->avctx, &gbytes, le, 0, &s->exif_metadata);
if (ret < 0) {
av_log(s->avctx, AV_LOG_ERROR, "mjpeg: error decoding EXIF data\n");
return ret;
}
}
bytes_read = bytestream2_tell(&gbytes);