aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpegdec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2014-04-17 18:09:46 -0400
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2014-04-18 12:41:10 -0400
commit39ef000e19b556196e829c6eeec46b65a77bc385 (patch)
tree26ae3d4da51072663ff115707315d081204fcb87 /libavcodec/mjpegdec.c
parent968c44ce895017b9e660adf624a11ef7df11bb2c (diff)
downloadffmpeg-39ef000e19b556196e829c6eeec46b65a77bc385.tar.gz
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>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r--libavcodec/mjpegdec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 6a93f4afdd..722d1bca46 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -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);